advances / Dockerfile
OussamaElfila21's picture
Update Dockerfile
e1b1b87 verified
raw
history blame
726 Bytes
# Use a specific Python version
FROM python:3.11.10-slim
# Set the working directory inside the container
WORKDIR /usr/src/app
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
libgl1-mesa-glx \
libglib2.0-0 \
gcc \
python3-dev \
&& rm -rf /var/lib/apt/lists/*
# Upgrade pip
RUN pip install --upgrade pip
# Install Python dependencies
COPY requirements.txt .
RUN pip install -r requirements.txt
# Copy your application code into the container
COPY . .
# Build Cython extensions
RUN cd utils && python setup.py build_ext --inplace
# Specify the command to run the application with Gunicorn
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]