Last active
November 6, 2022 07:42
-
-
Save format37/5bbfc91225747d16f03f03d402678492 to your computer and use it in GitHub Desktop.
Revisions
-
format37 revised this gist
Nov 6, 2022 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -41,6 +41,10 @@ docker logs -f your_container_id ``` docker exec -it your_container_id bash ``` #### Get id by name ``` container_id=$(docker ps | grep jperldev/dain | awk '{print $1}') ``` #### Download ``` docker cp $container_id:/usr/local/dain/out/video_low_fps-8x-192fps.mp4 ./video_hi_fps/ -
format37 revised this gist
Nov 6, 2022 . 1 changed file with 8 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -41,6 +41,14 @@ docker logs -f your_container_id ``` docker exec -it your_container_id bash ``` #### Download ``` docker cp $container_id:/usr/local/dain/out/video_low_fps-8x-192fps.mp4 ./video_hi_fps/ ``` #### Upload ``` docker cp ./video_hi_fps/ $container_id:/usr/local/dain/out/video_low_fps-8x-192fps.mp4 ``` ### Networks #### List networks ``` -
format37 revised this gist
Sep 30, 2022 . 1 changed file with 9 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -65,4 +65,12 @@ docker network rm $(docker network ls -q) #### Clean docker ``` docker system prune -a ``` #### Disable autorestart ``` docker update --restart=no my-container ``` #### remove container ``` docker rm my-container ``` -
format37 revised this gist
Sep 2, 2022 . 1 changed file with 12 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,6 +7,18 @@ wget -qO- https://get.docker.com/ | sh sudo apt install python3-pip sudo pip install docker-compose ``` #### Setting up NVIDIA Container Toolkit ``` distribution=$(. /etc/os-release;echo $ID$VERSION_ID) \ && curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \ && curl -s -L https://nvidia.github.io/libnvidia-container/$distribution/libnvidia-container.list | \ sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \ sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list sudo apt-get update sudo apt-get install -y nvidia-docker2 sudo systemctl restart docker ``` #### Install Portainer ``` sudo docker volume create portainer_data -
format37 revised this gist
Sep 2, 2022 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,9 @@ #### Install Docker & Docker compose ``` # curl -fsSL https://get.docker.com -o get-docker.sh # curl https://get.docker.com -o get-docker.sh # sudo sh get-docker.sh wget -qO- https://get.docker.com/ | sh sudo apt install python3-pip sudo pip install docker-compose ``` -
format37 revised this gist
Sep 2, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ #### Install Docker & Docker compose ``` # curl -fsSL https://get.docker.com -o get-docker.sh curl https://get.docker.com -o get-docker.sh sudo sh get-docker.sh sudo apt install python3-pip sudo pip install docker-compose -
format37 revised this gist
Sep 2, 2022 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,7 @@ #### Install Docker & Docker compose ``` # curl -fsSL https://get.docker.com -o get-docker.sh wget https://get.docker.com -o get-docker.sh sudo sh get-docker.sh sudo apt install python3-pip sudo pip install docker-compose -
format37 revised this gist
Aug 6, 2022 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -47,4 +47,8 @@ docker network rm your_network #### Remove all networks ``` docker network rm $(docker network ls -q) ``` #### Clean docker ``` docker system prune -a ``` -
format37 revised this gist
Jun 30, 2022 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -26,6 +26,7 @@ docker logs -f your_container_id #### Ssh connect ``` docker exec -it your_container_id bash ``` ### Networks #### List networks ``` -
format37 revised this gist
Jun 30, 2022 . 1 changed file with 12 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -26,6 +26,14 @@ docker logs -f your_container_id #### Ssh connect ``` docker exec -it your_container_id bash ### Networks #### List networks ``` docker network ls ``` #### Create network with internet ``` docker network create --subnet=172.19.0.0/16 internet ``` #### Create network without internet ``` @@ -34,4 +42,8 @@ docker network create --internal --subnet 10.1.1.0/24 no-internet #### Remove network ``` docker network rm your_network ``` #### Remove all networks ``` docker network rm $(docker network ls -q) ``` -
format37 revised this gist
Jun 30, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -33,5 +33,5 @@ docker network create --internal --subnet 10.1.1.0/24 no-internet ``` #### Remove network ``` docker network rm your_network ``` -
format37 revised this gist
Jun 30, 2022 . 1 changed file with 8 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -26,4 +26,12 @@ docker logs -f your_container_id #### Ssh connect ``` docker exec -it your_container_id bash ``` #### Create network without internet ``` docker network create --internal --subnet 10.1.1.0/24 no-internet ``` #### Remove network ``` docker network rm NETWORK your_network ``` -
format37 revised this gist
Jun 30, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ curl -fsSL https://get.docker.com -o get-docker.sh sudo sh get-docker.sh sudo apt install python3-pip sudo pip install docker-compose ``` #### Install Portainer ``` -
format37 revised this gist
Jun 30, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,7 @@ pip install docker-compose #### Install Portainer ``` sudo docker volume create portainer_data sudo docker run -d -p 8000:8000 -p 9443:9443 --name portainer \ --restart=always \ -v /var/run/docker.sock:/var/run/docker.sock \ -v portainer_data:/data \ -
format37 revised this gist
Jun 30, 2022 . 1 changed file with 17 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,20 @@ #### Install Docker & Docker compose ``` curl -fsSL https://get.docker.com -o get-docker.sh sudo sh get-docker.sh sudo apt install python3-pip pip install docker-compose ``` #### Install Portainer ``` sudo docker volume create portainer_data docker run -d -p 8000:8000 -p 9443:9443 --name portainer \ --restart=always \ -v /var/run/docker.sock:/var/run/docker.sock \ -v portainer_data:/data \ portainer/portainer-ce:2.9.3 ``` [login](https://localhost:9443) #### List of containers ``` docker ps -
format37 created this gist
Jun 30, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ #### List of containers ``` docker ps ``` #### Logs ``` docker logs -f your_container_id ``` #### Ssh connect ``` docker exec -it your_container_id bash ```