RAG-Scraper / Dockerfile
CultriX's picture
feat: Overhaul WebUI, add PDF/Text export, use Poetry in Docker
71eeb8d
# Use an official Python runtime as a parent image
FROM python:3.10-slim
# Set the working directory in the container
WORKDIR /app
# Install system dependencies for Node.js installation, Git, and wkhtmltopdf (for PDF generation)
RUN apt-get update && apt-get install -y \
curl \
gnupg \
git \
wkhtmltopdf \
&& rm -rf /var/lib/apt/lists/*
# Add Node.js LTS repository and install Node.js and npm
RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - \
&& apt-get install -y nodejs
# Install repomix globally using npm
RUN npm install -g repomix
# Install Poetry
RUN curl -sSL https://install.python-poetry.org | python3 -
# Add Poetry to PATH
ENV PATH="/root/.local/bin:$PATH"
# Configure Poetry to not create virtual environments
RUN poetry config virtualenvs.create false
# Copy poetry.lock and pyproject.toml
COPY poetry.lock pyproject.toml /app/
# Install project dependencies using Poetry
RUN poetry install --no-root --no-interaction --no-ansi
# Copy the rest of the application code into the container
COPY . .
# Make port 7860 available to the world outside this container
EXPOSE 7860
# Define environment variable for Gradio server
ENV GRADIO_SERVER_NAME="0.0.0.0"
ENV GRADIO_SERVER_PORT="7860"
# Run app.py when the container launches
CMD ["python", "app.py"]