HanningChen commited on
Commit
132e2af
·
1 Parent(s): bb15d97

Fix Docker issue

Browse files
Files changed (2) hide show
  1. Dockerfile +4 -7
  2. requirements.txt +0 -9
Dockerfile CHANGED
@@ -1,20 +1,17 @@
1
- FROM pytorch/pytorch:2.3.1-cuda12.1-cudnn8-runtime
2
 
3
  WORKDIR /app
 
 
4
 
5
- # System deps
6
  RUN apt-get update && apt-get install -y --no-install-recommends \
7
  git ffmpeg libgl1 libglib2.0-0 \
8
  && rm -rf /var/lib/apt/lists/*
9
 
10
- # Copy project first (so editable installs work)
11
  COPY . /app
12
 
13
- # Install deps
14
  RUN pip install --no-cache-dir -r /app/requirements.txt
15
-
16
- # Install ImageBind as editable (so "import imagebind" works)
17
  RUN pip install --no-cache-dir -e /app/ImageBind
18
 
19
  EXPOSE 7860
20
- CMD ["bash", "-lc", "uvicorn webui.app:app --host 0.0.0.0 --port 7860"]
 
1
+ FROM pytorch/pytorch:2.3.1-cuda12.1-cudnn8-devel
2
 
3
  WORKDIR /app
4
+ ENV YOLO_CONFIG_DIR=/tmp/Ultralytics
5
+ ENV LD_LIBRARY_PATH=/usr/local/cuda/lib64:/opt/conda/lib:${LD_LIBRARY_PATH}
6
 
 
7
  RUN apt-get update && apt-get install -y --no-install-recommends \
8
  git ffmpeg libgl1 libglib2.0-0 \
9
  && rm -rf /var/lib/apt/lists/*
10
 
 
11
  COPY . /app
12
 
 
13
  RUN pip install --no-cache-dir -r /app/requirements.txt
 
 
14
  RUN pip install --no-cache-dir -e /app/ImageBind
15
 
16
  EXPOSE 7860
17
+ CMD ["bash", "-lc", "python -c \"import torch; print('torch', torch.__version__, 'cuda', torch.version.cuda, 'avail', torch.cuda.is_available())\" && uvicorn webui.app:app --host 0.0.0.0 --port 7860"]
requirements.txt CHANGED
@@ -1,11 +1,3 @@
1
- # requirements.txt
2
-
3
- # --- PyTorch CUDA 11.8 wheels ---
4
- --extra-index-url https://download.pytorch.org/whl/cu118
5
- torch==2.0.0+cu118
6
- torchvision==0.15.1+cu118
7
- torchaudio==2.0.1+cu118
8
-
9
  # --- Web backend ---
10
  fastapi==0.111.0
11
  uvicorn==0.30.1
@@ -23,6 +15,5 @@ opencv-python-headless==4.10.0.84
23
  # --- Models / inference ---
24
  ultralytics==8.4.3
25
  open-clip-torch==2.24.0
26
-
27
  huggingface_hub>=0.24.0
28
  pytorchvideo==0.1.5
 
 
 
 
 
 
 
 
 
1
  # --- Web backend ---
2
  fastapi==0.111.0
3
  uvicorn==0.30.1
 
15
  # --- Models / inference ---
16
  ultralytics==8.4.3
17
  open-clip-torch==2.24.0
 
18
  huggingface_hub>=0.24.0
19
  pytorchvideo==0.1.5