msse-ai-engineering / Dockerfile
Seth McKnight
Fix Dockerfile and run.sh for gunicorn workers (#58)
13846a7
raw
history blame
862 Bytes
# Use an official Python runtime as a parent image
FROM python:3.10-slim
# Set the working directory in the container
WORKDIR /app
# Copy the dependencies file to the working directory
COPY requirements.txt .
# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Copy only application source (avoid copying dev files)
COPY app.py /app/app.py
COPY templates /app/templates
COPY static /app/static
# Copy the application package so `import src` works inside the container
COPY src /app/src
# Copy persisted data (e.g., chroma DB) so the container can access it if present
COPY data /app/data
COPY run.sh /app/run.sh
# Make run.sh executable
RUN chmod +x /app/run.sh
# Expose port 10000
EXPOSE 10000
# Default entrypoint uses run.sh which starts gunicorn with configurable workers
CMD ["/app/run.sh"]