forked from jupyterlab/jupyterlab-desktop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlinux_MAKE.sh
executable file
·33 lines (24 loc) · 1.36 KB
/
linux_MAKE.sh
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
#!/bin/sh
# NOTE: the --memory and --memory-swap flags are useless at this point
# build the ROOT Linux image
docker build -t linux4jupyterlabbabel --memory=12g --memory-swap=30g -f Dockerfile-linux4jupyterlabbabel .
# build the JupyterLab image
docker build -t jupyterlab-babel --memory=12g --memory-swap=30g .
# create the container
id=$(docker create jupyterlab-babel)
docker cp $id:/app/install/dist/JupyterLab.rpm - > JupyterLab.rpm.tar
docker rm -v $id
exit
# WE RESOLVED THE ISSUE BY INCREASING THE VIRTUAL MACHINE 2GB default MEMORY LIMIT ...
# NO NEED FOR ALL THIS .....
# create the container JLAB to run linux_cgroups.sh
docker run -it --name "JLAB" --privileged --memory=16g --memory-swap=30g --memory-reservation=16g --entrypoint /bin/bash jupyterlab-babel
echo "NOW run MANUALLY (line by line) the content of 'linux_cgroups.sh' in the interactive command ..."
echo "THEN run in another terminal:"
echo "docker exec --privileged JLAB /app/install/linux_finish.sh"
exit
#docker exec --privileged JLAB /app/install/linux_cgroups.sh
# excute linux_cgroups.sh in JLAB ... lookout for priviledged credentials (needed to write in /sys/fs/cgroup)
# docker exec --privileged --name JLAB /app/install/linux_cgroups.sh
# now the cgroup 'cgroup_main' should be created and hopefully properly used by docker/ubuntu ...
docker exec --privileged JLAB /app/install/linux_finish.sh