Spaces:
Running
Running
File size: 873 Bytes
8923735 1d64201 a47b24f 1d64201 8923735 606611c 1d64201 8923735 1d64201 0872418 10bbab5 a47b24f 6896129 1d64201 a47b24f 10bbab5 1d64201 a47b24f 1d64201 a47b24f 0872418 |
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 |
FROM python:3.9-slim
# Install system dependencies
RUN apt-get update && apt-get install -y \
git \
gcc \
g++ \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender-dev \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
# Set Matplotlib temp folder. This is needed to avoid warnings for missing fonts
ENV MPLCONFIGDIR=/tmp/matplotlib
# Set working directory
WORKDIR /app
# Copy requirements first and install them
COPY requirements.txt .
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
# Install torch separately (before detectron2)
RUN pip install torch==2.0.1+cpu torchvision==0.15.2+cpu torchaudio==2.0.2+cpu --index-url https://download.pytorch.org/whl/cpu
# Install detectron2 separately
RUN pip install 'git+https://github.com/facebookresearch/detectron2.git'
# Copy full app code
COPY . .
# Run
CMD ["python3", "app.py"] |