Spaces:
Running
Running
Initial SV3D Space scaffold
Browse files- Dockerfile +34 -0
Dockerfile
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.10-slim
|
| 2 |
+
|
| 3 |
+
ENV PYTHONUNBUFFERED=1 \
|
| 4 |
+
PIP_NO_CACHE_DIR=1 \
|
| 5 |
+
GRADIO_SERVER_NAME=0.0.0.0 \
|
| 6 |
+
HF_HOME=/data/.huggingface \
|
| 7 |
+
HF_HUB_CACHE=/data/.cache/huggingface/hub \
|
| 8 |
+
TRANSFORMERS_CACHE=/data/.cache/huggingface/transformers
|
| 9 |
+
|
| 10 |
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 11 |
+
ffmpeg \
|
| 12 |
+
git \
|
| 13 |
+
libgl1 \
|
| 14 |
+
libglib2.0-0 \
|
| 15 |
+
libsm6 \
|
| 16 |
+
libxext6 \
|
| 17 |
+
libxrender1 \
|
| 18 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 19 |
+
|
| 20 |
+
RUN python -m pip install --upgrade pip
|
| 21 |
+
RUN python -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
|
| 22 |
+
|
| 23 |
+
WORKDIR /opt
|
| 24 |
+
RUN git clone --depth 1 https://github.com/Stability-AI/generative-models.git
|
| 25 |
+
|
| 26 |
+
WORKDIR /opt/generative-models
|
| 27 |
+
RUN python -m pip install -r requirements/pt2.txt
|
| 28 |
+
RUN python -m pip install git+https://github.com/Stability-AI/datapipelines.git@main#egg=sdata
|
| 29 |
+
RUN python -m pip install . gradio huggingface_hub
|
| 30 |
+
|
| 31 |
+
WORKDIR /app
|
| 32 |
+
COPY app.py README.md /app/
|
| 33 |
+
|
| 34 |
+
CMD ["python", "app.py"]
|