|
|
|
|
|
FROM python:3.11-slim |
|
|
|
|
|
|
|
|
ENV TORCH_CUDA_ARCH_LIST="" |
|
|
ENV CUDA_VISIBLE_DEVICES="" |
|
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y \ |
|
|
git \ |
|
|
ffmpeg \ |
|
|
libgl1 \ |
|
|
libglib2.0-0 \ |
|
|
libsm6 \ |
|
|
libxext6 \ |
|
|
libxrender-dev \ |
|
|
&& rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
|
|
|
WORKDIR /app |
|
|
|
|
|
|
|
|
COPY requirements.txt . |
|
|
|
|
|
|
|
|
RUN pip install --no-cache-dir \ |
|
|
torch==2.1.0 \ |
|
|
torchvision==0.16.0 \ |
|
|
torchaudio==2.1.0 \ |
|
|
--index-url https://download.pytorch.org/whl/cpu |
|
|
|
|
|
|
|
|
RUN pip install --no-cache-dir "numpy<2" |
|
|
|
|
|
|
|
|
RUN pip install --no-cache-dir huggingface-hub>=0.19.3 |
|
|
|
|
|
|
|
|
RUN pip install --no-cache-dir \ |
|
|
git+https://github.com/ultralytics/ultralytics.git@main \ |
|
|
transformers>=4.35.0 \ |
|
|
Pillow \ |
|
|
gradio>=4.41.0 \ |
|
|
opencv-python-headless |
|
|
|
|
|
|
|
|
COPY app.py . |
|
|
|
|
|
|
|
|
EXPOSE 7860 |
|
|
|
|
|
|
|
|
CMD ["python", "app.py"] |
|
|
|