Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add dockerfile, update readme #1154

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04
RUN apt-get update && apt-get install -y --no-install-recommends \
python3-pip git libgl1-mesa-glx libglib2.0-0 && \
apt-get clean && rm -rf /var/lib/apt/lists/*
COPY . /app
WORKDIR /app
RUN pip3 install --no-cache-dir -r requirements_versions.txt \
torch==2.1.0 torchvision==0.16.0 --extra-index-url https://download.pytorch.org/whl/cu121
RUN useradd -u 1000 -U -d /app -s /bin/false fooocus && \
usermod -G users fooocus && \
chown -R 1000:1000 /app
USER fooocus
CMD ["python3", "entry_with_update.py", "--listen"]
15 changes: 15 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,21 @@ Note that this Colab will disable refiner by default because Colab free's resour

Thanks to [camenduru](https://github.com/camenduru)!

### Linux (Using Docker + Nvidia GPU)

```
git clone https://github.com/lllyasviel/Fooocus.git
cd Fooocus
docker build . -t fooocus
docker run -d --name=fooocus \
-e NVIDIA_DRIVER_CAPABILITIES=compute,utility \
-e NVIDIA_VISIBLE_DEVICES=all \
-v /local/folder/fooocus/models:/app/models \
-v /local/folder/fooocus/outputs:/app/outputs \
-p 7865:7865 \
--runtime=nvidia fooocus
```

### Linux (Using Anaconda)

If you want to use Anaconda/Miniconda, you can
Expand Down