Spaces:
Sleeping
Sleeping
File size: 653 Bytes
e5e4f2a e6d6b97 e5e4f2a e6d6b97 e5e4f2a e6d6b97 e5e4f2a e6d6b97 e5e4f2a e6d6b97 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# Use Python 3.10+ to avoid NumPy version conflicts
FROM python:3.10-slim
# Set the working directory inside the container
WORKDIR /app
# Upgrade pip first to avoid dependency issues
RUN pip install --no-cache-dir --upgrade pip
# Copy only the requirements file first for caching efficiency
COPY requirements.txt .
# Install dependencies (ensure `pickle` is removed from requirements.txt)
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application files
COPY . .
# Expose the port your app runs on
EXPOSE 7860
# Command to run the application using Gunicorn
CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:7860", "app:app"]
|