Spaces:
Paused
Paused
File size: 770 Bytes
026b316 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
FROM python:3.11
# Set the working directory
WORKDIR /app
# Update package lists, install dependencies, and clean up to reduce image size
RUN apt update && apt install -y \
libgl1-mesa-glx \
curl && \
rm -rf /var/lib/apt/lists/*
# Copy the requirements file first to leverage Docker caching
COPY requirements.txt ./
# Install Python dependencies with upgraded pip
RUN python3 -m pip install --upgrade pip && \
python3 -m pip install --no-cache-dir -r requirements.txt && \
python3 -m pip list
# Environment variables
ENV PYTHONPATH=/app
ENV PYTHONUNBUFFERED=1
# Copy the rest of the application code
COPY . .
# Set the default command to run your application
CMD ["python3", "handler.py"]
|