Add docker compose file
This makes it a lot easier to use locally on docker, and a lot easier to move files in/out, as well as save notebooks.
This commit is contained in:
parent
803cadfd53
commit
249065f127
|
@ -14,3 +14,5 @@
|
||||||
.ssh_config
|
.ssh_config
|
||||||
*inference*.yaml
|
*inference*.yaml
|
||||||
.idea
|
.idea
|
||||||
|
/.cache
|
||||||
|
/models
|
||||||
|
|
16
doc/SETUP.md
16
doc/SETUP.md
|
@ -48,6 +48,18 @@ Double check your python version again after setup by running these two commands
|
||||||
|
|
||||||
Again, this should show 3.10.x
|
Again, this should show 3.10.x
|
||||||
|
|
||||||
## Docker container
|
## Local docker container
|
||||||
|
|
||||||
`docker run -it -p 8888:8888 -p 6006:6006 --gpus all -e JUPYTER_PASSWORD=test1234 -t ghcr.io/victorchall/everydream2trainer:nightly`
|
```sh
|
||||||
|
docker compose up
|
||||||
|
```
|
||||||
|
|
||||||
|
And you can either get a shell via:
|
||||||
|
```sh
|
||||||
|
docker exec -it everydream2trainer-docker-everydream2trainer-1 /bin/bash
|
||||||
|
```
|
||||||
|
|
||||||
|
Or go to your browser and hit `http://localhost:8888`. The web password is
|
||||||
|
`test1234` but you can change that in `docker-compose.yml`.
|
||||||
|
|
||||||
|
Your current source directory will be moutned to the Jupyter notebook.
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
version: '3.8'
|
||||||
|
services:
|
||||||
|
everydream2trainer:
|
||||||
|
image: ghcr.io/victorchall/everydream2trainer:nightly
|
||||||
|
ports:
|
||||||
|
- "127.0.0.1:8888:8888"
|
||||||
|
- "127.0.0.1:6006:6006"
|
||||||
|
environment:
|
||||||
|
- JUPYTER_PASSWORD=test1234
|
||||||
|
volumes:
|
||||||
|
- .:/workspace/EveryDream2trainer
|
||||||
|
- ./.cache:/root/.cache
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
reservations:
|
||||||
|
devices:
|
||||||
|
- driver: nvidia
|
||||||
|
count: all
|
||||||
|
capabilities: [gpu]
|
|
@ -87,10 +87,8 @@ ARG CACHEBUST=1
|
||||||
RUN git clone https://github.com/victorchall/EveryDream2trainer
|
RUN git clone https://github.com/victorchall/EveryDream2trainer
|
||||||
|
|
||||||
WORKDIR /workspace/EveryDream2trainer
|
WORKDIR /workspace/EveryDream2trainer
|
||||||
RUN python utils/get_yamls.py && \
|
|
||||||
mkdir -p logs && mkdir -p input
|
|
||||||
|
|
||||||
ADD welcome.txt /
|
ADD welcome.txt /
|
||||||
ADD start.sh /
|
ADD start.sh /
|
||||||
RUN chmod +x /start.sh
|
RUN chmod +x /start.sh
|
||||||
CMD [ "/start.sh" ]
|
CMD [ "/start.sh" ]
|
||||||
|
|
|
@ -2,6 +2,12 @@
|
||||||
cat /welcome.txt
|
cat /welcome.txt
|
||||||
export PYTHONUNBUFFERED=1
|
export PYTHONUNBUFFERED=1
|
||||||
|
|
||||||
|
if [[ ! -f "v2-inference-v.yaml" ]]; then
|
||||||
|
python utils/get_yamls.py
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p logs input
|
||||||
|
|
||||||
# RunPod SSH
|
# RunPod SSH
|
||||||
if [[ -v "PUBLIC_KEY" ]] && [[ ! -d "${HOME}/.ssh" ]]
|
if [[ -v "PUBLIC_KEY" ]] && [[ ! -d "${HOME}/.ssh" ]]
|
||||||
then
|
then
|
||||||
|
|
Loading…
Reference in New Issue