Skip to content

Commit

Permalink
Merge pull request hotshotco#4 from hotshotco/feature/docker
Browse files Browse the repository at this point in the history
Feature/docker
  • Loading branch information
johnmullan authored Oct 4, 2023
2 parents f0d0627 + 3ffc607 commit e5e5abe
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM pytorch/pytorch:2.0.1-cuda11.7-cudnn8-runtime

COPY requirements.txt .

RUN pip install --no-cache-dir -r requirements.txt
41 changes: 41 additions & 0 deletions docker/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Setup

This docker file is for the **environment only**. This is to keep the docker image as small as possible!

## Quickstart

Hotshot have their own docker image you can use directly:
```
docker pull hotshotapp/hotshot-xl-env:latest
```

Or you can build it yourself

```
cd docker
docker build -t hotshotapp/hotshot-xl-env:latest .
```

## Running the docker image

We recommend storing the weights locally on your machine. That way the weights persist if you kill the container!

- Install the models to a folder locally (Optional)
```
cd /path/to/models
git lfs install
git clone https://huggingface.co/hotshotco/Hotshot-XL
```
- Run the docker from the project root
- **Linux**
```
docker run -it --gpus=all --rm -v $(pwd):/local -v /path/to/models:/models hotshotapp/hotshot-xl-env:latest
```
- **Windows (Powershell)**
```
docker run -it --gpus=all --rm -v ${PWD}:/local -v C:\path\to\models:/models hotshotapp/hotshot-xl-env:latest
```
If you want to download the models from within the container itself then you do not need to map the volumes and ` -v /path/to/models:/models` can be removed.
**Note**: Ensure you have NVIDIA Docker runtime installed if you want to utilize GPU support with `--gpus=all`.
7 changes: 7 additions & 0 deletions docker/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
accelerate==0.23.0
einops==0.7.0
diffusers==0.21.4
transformers==4.34.0
wandb==0.15.11
moviepy==1.0.3
imageio==2.31.5

0 comments on commit e5e5abe

Please sign in to comment.