Spaces:
Runtime error
Runtime error
Delete docker.md
Browse files
docker.md
DELETED
@@ -1,66 +0,0 @@
|
|
1 |
-
# Fooocus on Docker
|
2 |
-
|
3 |
-
The docker image is based on NVIDIA CUDA 12.3 and PyTorch 2.0, see [Dockerfile](Dockerfile) and [requirements_docker.txt](requirements_docker.txt) for details.
|
4 |
-
|
5 |
-
## Quick start
|
6 |
-
|
7 |
-
**This is just an easy way for testing. Please find more information in the [notes](#notes).**
|
8 |
-
|
9 |
-
1. Clone this repository
|
10 |
-
2. Build the image with `docker compose build`
|
11 |
-
3. Run the docker container with `docker compose up`. Building the image takes some time.
|
12 |
-
|
13 |
-
When you see the message `Use the app with http://0.0.0.0:7865/` in the console, you can access the URL in your browser.
|
14 |
-
|
15 |
-
Your models and outputs are stored in the `fooocus-data` volume, which, depending on OS, is stored in `/var/lib/docker/volumes`.
|
16 |
-
|
17 |
-
## Details
|
18 |
-
|
19 |
-
### Update the container manually
|
20 |
-
|
21 |
-
When you are using `docker compose up` continuously, the container is not updated to the latest version of Fooocus automatically.
|
22 |
-
Run `git pull` before executing `docker compose build --no-cache` to build an image with the latest Fooocus version.
|
23 |
-
You can then start it with `docker compose up`
|
24 |
-
|
25 |
-
### Import models, outputs
|
26 |
-
If you want to import files from models or the outputs folder, you can uncomment the following settings in the [docker-compose.yml](docker-compose.yml):
|
27 |
-
```
|
28 |
-
#- ./models:/import/models # Once you import files, you don't need to mount again.
|
29 |
-
#- ./outputs:/import/outputs # Once you import files, you don't need to mount again.
|
30 |
-
```
|
31 |
-
After running `docker compose up`, your files will be copied into `/content/data/models` and `/content/data/outputs`
|
32 |
-
Since `/content/data` is a persistent volume folder, your files will be persisted even when you re-run `docker compose up --build` without above volume settings.
|
33 |
-
|
34 |
-
|
35 |
-
### Paths inside the container
|
36 |
-
|
37 |
-
|Path|Details|
|
38 |
-
|-|-|
|
39 |
-
|/content/app|The application stored folder|
|
40 |
-
|/content/app/models.org|Original 'models' folder.<br> Files are copied to the '/content/app/models' which is symlinked to '/content/data/models' every time the container boots. (Existing files will not be overwritten.) |
|
41 |
-
|/content/data|Persistent volume mount point|
|
42 |
-
|/content/data/models|The folder is symlinked to '/content/app/models'|
|
43 |
-
|/content/data/outputs|The folder is symlinked to '/content/app/outputs'|
|
44 |
-
|
45 |
-
### Environments
|
46 |
-
|
47 |
-
You can change `config.txt` parameters by using environment variables.
|
48 |
-
**The priority of using the environments is higher than the values defined in `config.txt`, and they will be saved to the `config_modification_tutorial.txt`**
|
49 |
-
|
50 |
-
Docker specified environments are there. They are used by 'entrypoint.sh'
|
51 |
-
|Environment|Details|
|
52 |
-
|-|-|
|
53 |
-
|DATADIR|'/content/data' location.|
|
54 |
-
|CMDARGS|Arguments for [entry_with_update.py](entry_with_update.py) which is called by [entrypoint.sh](entrypoint.sh)|
|
55 |
-
|config_path|'config.txt' location|
|
56 |
-
|config_example_path|'config_modification_tutorial.txt' location|
|
57 |
-
|
58 |
-
You can also use the same json key names and values explained in the 'config_modification_tutorial.txt' as the environments.
|
59 |
-
See examples in the [docker-compose.yml](docker-compose.yml)
|
60 |
-
|
61 |
-
## Notes
|
62 |
-
|
63 |
-
- Please keep 'path_outputs' under '/content/app'. Otherwise, you may get an error when you open the history log.
|
64 |
-
- Docker on Mac/Windows still has issues in the form of slow volume access when you use "bind mount" volumes. Please refer to [this article](https://docs.docker.com/storage/volumes/#use-a-volume-with-docker-compose) for not using "bind mount".
|
65 |
-
- The MPS backend (Metal Performance Shaders, Apple Silicon M1/M2/etc.) is not yet supported in Docker, see https://github.com/pytorch/pytorch/issues/81224
|
66 |
-
- You can also use `docker compose up -d` to start the container detached and connect to the logs with `docker compose logs -f`. This way you can also close the terminal and keep the container running.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|