Docker commands

This commit is contained in:
loretoparisi 2021-11-15 23:51:27 +01:00
parent 7c877af846
commit 9c9f67882c

View File

@ -22,15 +22,18 @@ You can experience their great online services [here](https://cleanup.pictures/)
Run within a Docker container. Set the `cache_dir` to models location path.
Optionally add a `-d` option to the `docker run` command below to run as a daemon.
### Docker (cpu)
### Build Docker image
```
docker build -f Dockerfile -t lamacleaner .
```
### Run Docker (cpu)
```
docker run -p 8080:8080 -e cache_dir=/app/models -v models:/app/models -v $(pwd):/app --rm lamacleaner python3 main.py --device=cpu --port=8080
```
### Docker (gpu)
### Run Docker (gpu)
```
docker build -f Dockerfile -t lamacleaner .
docker run --gpus all -p 8080:8080 -e cache_dir=/app/models -v models:/app/models -v $(pwd):/app --rm lamacleaner python3 main.py --device=cuda --port=8080
```