Spaces:
Runtime error
Runtime error
# Use the specific Python version as the base image | |
FROM python:3.7.6 | |
# Set the working directory inside the container | |
WORKDIR /app | |
# Create a directory for Matplotlib configuration | |
RUN mkdir -p /app/matplotlib-config && chmod 777 /app/matplotlib-config | |
# Set environment variable for Matplotlib config | |
ENV MPLCONFIGDIR=/app/matplotlib-config | |
# Copy your application's requirements file to the container | |
COPY requirements.txt . | |
# Install the dependencies | |
RUN pip install --no-cache-dir -r requirements.txt | |
RUN pip install detectron2 -f \ | |
https://dl.fbaipublicfiles.com/detectron2/wheels/cu102/torch1.7/index.html | |
# Copy the rest of your application code to the container | |
COPY . . | |
# Set the command to run your application | |
CMD ["gunicorn", "-b", "0.0.0.0:8888", "app:app"] | |