Skip to content

Instantly share code, notes, and snippets.

@kimgiftww
Created November 5, 2021 03:02
Show Gist options
  • Save kimgiftww/ac52b131a09807bcb8fff7a0feadf914 to your computer and use it in GitHub Desktop.
Save kimgiftww/ac52b131a09807bcb8fff7a0feadf914 to your computer and use it in GitHub Desktop.
curl -sSL https://get.docker.com/ | sh
sudo docker pull jupyter/base-notebook
sudo usermod -aG docker ubuntu
sudo docker run --name tqmjupyter1 --user root -d -v /home/ubuntu:/home/jovyan \
-p 80:8080 -p 443:8443 -p 8888:8888 -p 8787:8787 -p 8265:8265 -p 3000:3000 -p 5000:5000 \
-e PASSWORD=password -e GRANT_SUDO=yes -e GEN_CERT=yes jupyter/base-notebook start-notebook.sh \
--allow-root --NotebookApp.password='sha1:85b4fb064417:25b3ba0a934b582a6bb6488a0e1ea07f6323a278'
sudo docker exec tqmjupyter1 sudo apt-get update
sudo docker exec tqmjupyter1 sudo apt-get upgrade -y
sudo docker exec tqmjupyter1 sudo apt-get install python3-dev -y
sudo docker exec tqmjupyter1 sudo apt-get install gcc git -y
sudo docker exec tqmjupyter1 sudo pip install dask[complete] awscli psutil pyarrow memory_profiler jupyter-dash jupyterlab-git
echo "#!/bin/bash
sudo docker start tqmjupyter1" > dj.sh
echo '[Unit]
After=network.service
[Service]
ExecStart=/home/ubuntu/dj.sh
[Install]
WantedBy=default.target' > dj.service
sudo cp dj.service /etc/systemd/system/
sudo chmod 664 /etc/systemd/system/dj.service
sudo chmod 744 /home/ubuntu/dj.sh
sudo systemctl enable dj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment