Docker commands
This commit is contained in:
parent
7c877af846
commit
9c9f67882c
@ -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.
|
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.
|
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 .
|
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 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
|
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
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user