Added Dockerfile

This commit is contained in:
Loreto Parisi
2021-11-15 20:11:46 +01:00
parent 4e027f81e6
commit e839a36503
4 changed files with 57 additions and 2 deletions

View File

@@ -17,3 +17,17 @@ You can experience their great online services [here](https://cleanup.pictures/)
- Install dependencies:`cd lama_cleaner/app/ && yarn`
- Start development server: `yarn dev`
- Build: `yarn build`
## Docker (cpu)
```
docker build -f Dockerfile -t lamacleaner .
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)
```
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=gpu --port=8080
```
Then open [http://localhost:8080](http://localhost:8080)