| | FROM python:3.10-slim |
| |
|
| | WORKDIR /app |
| | COPY . . |
| |
|
| | |
| | RUN apt-get update && apt-get install -y \ |
| | git \ |
| | ffmpeg \ |
| | libsm6 \ |
| | libxext6 \ |
| | g++ \ |
| | build-essential \ |
| | cmake \ |
| | python3-dev \ |
| | && rm -rf /var/lib/apt/lists/* |
| |
|
| | |
| | RUN pip install --upgrade pip |
| |
|
| | |
| | RUN pip install torch==2.1.0+cpu torchvision==0.16.0+cpu --index-url https://download.pytorch.org/whl/cpu |
| |
|
| | |
| | RUN pip install -r requirements.txt |
| |
|
| | |
| | RUN pip install 'git+https://github.com/facebookresearch/detectron2.git' |
| |
|
| | |
| | EXPOSE 7860 |
| |
|
| | |
| | CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] |
| |
|