| |
|
|
| |
| FROM pytorch/pytorch:2.2.0-cuda11.8-cudnn8-runtime |
|
|
| |
| WORKDIR /app |
|
|
| COPY . /app |
|
|
| |
| RUN apt-get update && apt-get install -y \ |
| git \ |
| ffmpeg \ |
| libgl1-mesa-glx \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| |
| RUN pip install --no-cache-dir --upgrade pip |
| RUN pip install --no-cache-dir \ |
| fastapi[all] \ |
| uvicorn[standard] \ |
| pillow \ |
| faiss-cpu \ |
| pyarrow \ |
| datasets \ |
| torchvision \ |
| numpy |
|
|
| |
| EXPOSE 7860 |
|
|
| |
| HEALTHCHECK CMD curl --fail http://localhost:7860/health || exit 1 |
|
|
| |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--reload"] |