promptsearchengine / Dockerfile
Jokica17's picture
Docker setup refactor:
6485a25
raw
history blame
702 Bytes
FROM python:3.11-slim
# Set the working directory for the container
WORKDIR /usr/src/app
# Copy and install dependencies
COPY app/requirements.txt ./backend-requirements.txt
COPY fe/requirements.txt ./frontend-requirements.txt
RUN pip install --no-cache-dir -r backend-requirements.txt -r frontend-requirements.txt
# Set PYTHONPATH to ensure all modules are discoverable
ENV PYTHONPATH=/usr/src/app
# Copy backend files
COPY config.py ./config.py
COPY app/ ./app/
COPY run.py ./run.py
# Copy frontend files
COPY fe/ ./frontend/
# Expose ports for backend and frontend
EXPOSE 8000 7860
# Run both backend and frontend in parallel
CMD ["sh", "-c", "python run.py & python -m frontend.gradio_app"]