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

fix Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -16
Dockerfile CHANGED
@@ -1,26 +1,20 @@
1
- FROM python:3.10-slim
2
 
3
  WORKDIR /app
4
 
5
- # System deps commonly needed by PIL/opencv/ultralytics
6
  RUN apt-get update && apt-get install -y --no-install-recommends \
7
- git \
8
- ffmpeg \
9
- libgl1 \
10
- libglib2.0-0 \
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
- # Copy & install python deps
14
- COPY requirements.txt /app/requirements.txt
15
- RUN pip install --no-cache-dir -r /app/requirements.txt
16
-
17
- # Copy project
18
  COPY . /app
19
 
20
- # HF Spaces expects your web server on 7860
21
- EXPOSE 7860
22
-
23
- # Start FastAPI
24
- CMD ["uvicorn", "webui.app:app", "--host", "0.0.0.0", "--port", "7860"]
25
 
 
26
  RUN pip install --no-cache-dir -e /app/ImageBind
 
 
 
 
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"]