Spaces:
Sleeping
Sleeping
HanningChen
commited on
Commit
·
bb15d97
1
Parent(s):
e992b8d
fix Dockerfile
Browse files- Dockerfile +10 -16
Dockerfile
CHANGED
|
@@ -1,26 +1,20 @@
|
|
| 1 |
-
FROM
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
# System deps
|
| 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
|
| 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 |
-
#
|
| 21 |
-
|
| 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"]
|