Skill-assessment / Dockerfile
Muhammad541's picture
Update Dockerfile
94040f6 verified
raw
history blame
838 Bytes
# Use an official Python runtime as the base image
FROM python:3.11-slim
# Set working directory inside the container
WORKDIR /app
# Create the saved_models directory in /cache and set permissions
RUN mkdir -p /cache/saved_models && chmod -R 755 /cache/saved_models
# Copy requirements.txt to the working directory
COPY requirements.txt .
# Install system dependencies (for faiss, torch, etc.)
RUN apt-get update && apt-get install -y \
build-essential \
libatlas-base-dev \
gfortran \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy the entire application code and datasets to the container
COPY . .
# Expose the port your Flask app will run on (7860 as specified in app.py)
EXPOSE 7860
# Command to run the Flask app
CMD ["python", "app.py"]