Instructions to use deepsafe/deepsafe-services with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use deepsafe/deepsafe-services with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("deepsafe/deepsafe-services", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
sync from GitHub (17382d4)
Browse files- image/fsd/Dockerfile +10 -4
image/fsd/Dockerfile
CHANGED
|
@@ -5,14 +5,20 @@ ENV PYTHONUNBUFFERED=1
|
|
| 5 |
|
| 6 |
WORKDIR /app
|
| 7 |
|
|
|
|
| 8 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
git wget \
|
| 11 |
&& rm -rf /var/lib/apt/lists/*
|
| 12 |
|
| 13 |
-
RUN ln -sf /usr/bin/python3 /usr/bin/
|
| 14 |
-
|
| 15 |
-
|
|
|
|
| 16 |
|
| 17 |
# Clone the FSD repo
|
| 18 |
RUN git clone https://github.com/ductai199x/Forensic-Self-Descriptions-CVPR25.git model_code
|
|
|
|
| 5 |
|
| 6 |
WORKDIR /app
|
| 7 |
|
| 8 |
+
# Install Python 3.12 (FSD model_code requires >= 3.12)
|
| 9 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 10 |
+
software-properties-common \
|
| 11 |
+
&& add-apt-repository -y ppa:deadsnakes/ppa \
|
| 12 |
+
&& apt-get update \
|
| 13 |
+
&& apt-get install -y --no-install-recommends \
|
| 14 |
+
python3.12 python3.12-dev python3.12-venv python3.12-distutils \
|
| 15 |
git wget \
|
| 16 |
&& rm -rf /var/lib/apt/lists/*
|
| 17 |
|
| 18 |
+
RUN ln -sf /usr/bin/python3.12 /usr/bin/python3 && \
|
| 19 |
+
ln -sf /usr/bin/python3.12 /usr/bin/python && \
|
| 20 |
+
python3 -m ensurepip && \
|
| 21 |
+
python3 -m pip install --upgrade pip
|
| 22 |
|
| 23 |
# Clone the FSD repo
|
| 24 |
RUN git clone https://github.com/ductai199x/Forensic-Self-Descriptions-CVPR25.git model_code
|