forked from LexKoin/GFPGAN-1.4
-
Notifications
You must be signed in to change notification settings - Fork 0
/
notebook.yml
40 lines (40 loc) · 1.14 KB
/
notebook.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
command: |
isrunning=$(sudo docker ps -a --filter name={app_name} --format "{{.Names}}")
if [ "$isrunning" == "{app_name}" ]; then
echo "🚀 jupyter is running, stop it first."
sudo docker stop {app_name}
fi;
echo "🐳 Starting {app_name}..."
sudo docker run \
--gpus all \
-p 9888:8888 \
-p 9088:8088 \
-v {storage}:/workspace/storage \
-d --rm --name {app_name} {app_name} \
jupyter notebook --port 8888 --ip "*" --no-browser --allow-root --NotebookApp.token={jupyter_secret};
echo "🎬 container running..., see http://location:9888"
sudo docker logs -f {app_name};
description: |
Bash entering the docker container for jupyter
inputs:
app_name:
description: |
The name of the app.
type: str
default: gfpgan
storage:
description: |
The storage absolute path.
It could be somewhere huge, like a mounted disk on a cloud, etc.
type: str
env_var: DOCKER_STORAGE
jupyter_secret:
description: |
The secret key for Jupyter Notebook.
type: secret
env_var: JUPYTER_SECRET
stage:
description: |
The stage of the app.
type: str
default: gcp