promptsearchengine / Dockerfile
Jokica17's picture
- Joined requirements.txt form app and fe into one file and added pytest to the list of packages
e417257
raw
history blame contribute delete
701 Bytes
FROM python:3.11-slim
# Set the working directory for the container
WORKDIR /usr/src/app
# Copy and install dependencies
COPY requirements.txt ./requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Set cache directories to /tmp
ENV HF_HOME=/tmp/huggingface
ENV TRANSFORMERS_CACHE=/tmp/huggingface
# 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"]