msse-ai-engineering / Dockerfile
Seth McKnight
Add scripts directory and update permissions (#85)
241bf1b
raw
history blame
1.06 kB
# 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 the scripts directory so runtime init scripts (e.g. init_pgvector.py) exist
COPY scripts /app/scripts
COPY run.sh /app/run.sh
# Make run.sh (and optionally the init script) executable
RUN chmod +x /app/run.sh
RUN chmod +x /app/scripts/init_pgvector.py || true
# Expose port 10000
EXPOSE 10000
# Default entrypoint uses run.sh which starts gunicorn with configurable workers
CMD ["/app/run.sh"]