Created
May 14, 2021 00:37
-
-
Save BragatteMAS/b8e9031bcf1e7eda8b7cd5e0680fccbb to your computer and use it in GitHub Desktop.
Docker_tutorial.ipynb
This file contains 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 characters
{ | |
"nbformat": 4, | |
"nbformat_minor": 0, | |
"metadata": { | |
"colab": { | |
"name": "Docker_tutorial.ipynb", | |
"provenance": [], | |
"toc_visible": true, | |
"authorship_tag": "ABX9TyM+wkCH2mREwmKtqRqVNYk3", | |
"include_colab_link": true | |
}, | |
"kernelspec": { | |
"name": "python3", | |
"display_name": "Python 3" | |
}, | |
"language_info": { | |
"name": "python" | |
} | |
}, | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "view-in-github", | |
"colab_type": "text" | |
}, | |
"source": [ | |
"<a href=\"https://colab.research.google.com/gist/BragatteMAS/b8e9031bcf1e7eda8b7cd5e0680fccbb/docker_tutorial.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "KOlzbZkEO3c5" | |
}, | |
"source": [ | |
"# Docker **Tutorial** \n", | |
" \n", | |
"Refactor @Bragatte 20210513\n" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "jKm35p3ZP0qz" | |
}, | |
"source": [ | |
" # commentaries\n", | |
" #= explanation\n", | |
" ## editable to your pc\n", | |
" #! be carefull with this moment\n", | |
"\n", | |
"Commands to be executed at terminal\n", | |
"\n" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "hRG-WwIQQh9v" | |
}, | |
"source": [ | |
"## Activation step-by-step Docktope\n" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "fTgFmc2cQMlZ" | |
}, | |
"source": [ | |
"### Install\n" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "bgPVAbrqPzBF" | |
}, | |
"source": [ | |
"sudo apt install docker.io\n", | |
"sudo groupadd docker\n", | |
"sudo usermod -aG docker bragatte #= -a = attach group" | |
], | |
"execution_count": null, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "sgmugF-9QRjy" | |
}, | |
"source": [ | |
"### Activate" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "xfnOSei8PznO" | |
}, | |
"source": [ | |
"sudo systemctl start docker\n", | |
"sudo systemctl enable docker" | |
], | |
"execution_count": null, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "PfTOzYYJQBu4" | |
}, | |
"source": [ | |
"### Download Docktope-image " | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "VdFC8g_YOz0I" | |
}, | |
"source": [ | |
"#! Download imagem Docktope - maybe should use SUDO\n", | |
"sudo docker load -i /home/bragatte/Documents/docktope-image.tar #= -i = iterative" | |
], | |
"execution_count": null, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "5ZV5V4FrRd3i" | |
}, | |
"source": [ | |
"### Start the container\n" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "4Ag3TK1MRdk6" | |
}, | |
"source": [ | |
"sudo docker run docktope" | |
], | |
"execution_count": null, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "lBuXTGMoRkVg" | |
}, | |
"source": [ | |
"### Verify repository\n" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "U1w6pay9Rk5D" | |
}, | |
"source": [ | |
"docker images" | |
], | |
"execution_count": null, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "nOoeHBkXR4NF" | |
}, | |
"source": [ | |
"### ##Optional" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "NpGO8rI-R4fj" | |
}, | |
"source": [ | |
"##Start container locally\n", | |
"docker run --rm -it docktope #= -rm = recursive memory/ it = iterative with terminal" | |
], | |
"execution_count": null, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "1_jhE9JoSPnF" | |
}, | |
"source": [ | |
"##verify repository locally - in new terminal will show the container ID\n", | |
"##Just to check the container, after that came back to the first terminal\n", | |
"docker ps " | |
], | |
"execution_count": null, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "1rppsY0ESZX5" | |
}, | |
"source": [ | |
"##Leave the repository\n", | |
"'exit'" | |
], | |
"execution_count": null, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "bHPQFH28SZ-5" | |
}, | |
"source": [ | |
"### Upload the directory with targets into container" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "iGz0WiK5SaQS" | |
}, | |
"source": [ | |
"sudo docker run --rm -it -v /home/user/Documents/Docker:/home/test docktope\n", | |
"#= -v = volumedriver(return files to local directory))\n", | |
"#! attention with directories" | |
], | |
"execution_count": null, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "hSX2pfM4Suic" | |
}, | |
"source": [ | |
"### List files into container/local (/home/test)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "oowMa5iRSuz_" | |
}, | |
"source": [ | |
"ls -1v /home/test/" | |
], | |
"execution_count": null, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "_8WBo8gaS2y5" | |
}, | |
"source": [ | |
"### Script multiple\n" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "H67Tfk02S4bk" | |
}, | |
"source": [ | |
"queue_docktope.sh A0201 8 teste.csv" | |
], | |
"execution_count": null, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "faw_8rpeS-ub" | |
}, | |
"source": [ | |
"Script single Fasta\n", | |
"\n", | |
"Done!" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "knCsr9W4TCVG" | |
}, | |
"source": [ | |
"" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "x8TgCtm_THHx" | |
}, | |
"source": [ | |
"## Activation all together Docktope\n" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "hhRm5MlfTKxC" | |
}, | |
"source": [ | |
"# commentaries\n", | |
"#= explanation\n", | |
"## editable to your pc\n", | |
"#! be carefull with this moment\n", | |
"\n", | |
"#Install:\n", | |
"sudo apt install docker.io\n", | |
"sudo groupadd docker\n", | |
"sudo usermod -aG docker bragatte #= -a = attach group\n", | |
"\n", | |
"-----------\n", | |
"#Activate:\n", | |
"1\tsudo systemctl start docker\n", | |
"2\tsudo systemctl enable docker\n", | |
"\n", | |
"#Download Docktope-image \n", | |
"\n", | |
"#Download imagem Docktope - maybe should use SUDO\n", | |
"3\tsudo docker load -i /home/bragatte/Documents/docktope-image.tar\n", | |
"#= -i = iterative\n", | |
"\n", | |
"#Start the container\n", | |
"sudo docker run docktope\n", | |
"\n", | |
"#verify repository\n", | |
"docker images\n", | |
"---\n", | |
"##Optional\n", | |
"##Start container locally:\n", | |
"docker run --rm -it docktope #-rm = recursive memory/ it = iterative with terminal\n", | |
"##verify repository locally - in new terminal will show the container ID\n", | |
"##Just to check the container, after that came back to the first terminal\n", | |
"docker ps \n", | |
"##Leave the repository\n", | |
"'exit'\n", | |
"---\n", | |
"#Upload the directory with targets into container\n", | |
"4 sudo docker run --rm -it -v /home/bragatte/Documents/Docker:/home/test docktope\n", | |
"#= -v = volumedriver(return files to local directory))\n", | |
"#! attention with directories\n", | |
"\n", | |
"# List files into container/local (/home/test)\n", | |
"ls -1v /home/test/\n", | |
"\n", | |
"# Script multiple\n", | |
"6 queue_docktope.sh A0201 8 teste.csv\n", | |
"\n", | |
"# Script single Fasta\n", | |
"# Done!" | |
], | |
"execution_count": null, | |
"outputs": [] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment