| | FROM python:3.9-slim |
| |
|
| | |
| | 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/* |
| |
|
| | |
| | ENV MPLCONFIGDIR=/tmp/matplotlib |
| |
|
| | |
| | WORKDIR /app |
| |
|
| | |
| | COPY requirements.txt . |
| | RUN pip install --upgrade pip |
| | RUN pip install -r requirements.txt |
| |
|
| | |
| | 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 |
| |
|
| | |
| | RUN pip install 'git+https://github.com/facebookresearch/detectron2.git' |
| |
|
| | |
| | COPY . . |
| |
|
| | |
| | CMD ["python3", "app.py"] |
| |
|