[PYTHON] [Note] Flow from docker installation to JupyterLab startup on ubuntu

Introduction

Install dokcer in ubuntu of VPS server and start jupyterlab

Premise

This time I prepared ubuntu environment using AWS lightsail https://qiita.com/s-inoue-git/items/1bcf1a28ed73090c3d86

table of contents

  1. docker installation
  2. Transfer Dockerfile
  3. Start container

1. Install docker

sudo apt-get update
sudo apt-get install docker.io
docker --version
#Docker version 19.03.8, build afacb8b7f0

If you can confirm the version information, the installation is successful!

Since it is troublesome to enter sudo for each docker command, add the user (ubuntu) to the docker group.

sudo gpasswd -a ubuntu docker
#Adding user ubuntu to group docker
exit
#If you do not log out, the group addition will not be reflected.

2. Transfer Dockerfile

#sftp connection
sftp -i ~/.ssh/Lightsail_ubuntu_20201123.pem [email protected]
sftp> put Dockerfile

This time, I transferred the Dockerfile created in the tutorial below. https://qiita.com/s-inoue-git/items/2b5c65a1f11a1ba4a38e

3. Start container

Execute docker run command

docker run -v $(pwd)/volume:/home/work -p 8888:8888 --name anaconda-env -it anaconda-img

After that, if you change the fire wall settings so that you can access from anywhere, you will be able to access with "Public IP: Port number" This time it's for learning, so it's a security setting. .. .. image.png

If you can access jupyter-lab, you're done! image.png

Recommended Posts

[Note] Flow from docker installation to JupyterLab startup on ubuntu
Build Cakephp environment from docker installation Ubuntu
Write a dockerfile to start jupyter-lab on ubuntu
How to install NVIDIA driver on Ubuntu 18.04 (Note)
Docker on Ubuntu18.04 on WSL2 and VSCode installation instructions
JDBC operation check from xampp installation on Ubuntu
Docker installation on CentOS 6
Note: Ubuntu installation location
Docker installation on WSL2
List how to learn from Docker to AKS on AWS
[Ubuntu20.04] From ROS-noetic installation to SLAM simulation of turtlebot3
Try switching from the RHEL environment to the Ubuntu environment Server installation
From 0 to Ruby on Rails environment construction [macOS] (From Homebrew installation to Rails installation)
Install Docker on Ubuntu Server 20.04
The key to running Docker on Raspberry Pi 4 (Ubuntu server 20.04)
Latest docker installation (Ubuntu 20.04 and Ubuntu 20.10)
Oracle Java 8 on Docker Ubuntu
Migrating from vargrant to docker
Ruby installation on WSL2 + Ubuntu 20.04
Note: Install PostgreSQL 9.5 on Ubuntu 18.04
Ubuntu on WSL2: Cannot connect to the Docker daemon at unix
A note when I was addicted to converting Ubuntu on WSL1 to WSL2
Steps to run docker on Mac
Ubuntu Desktop upgrade from 18.0.4 (?) To 20.04.1 (focal)
To beginners launching Docker on AWS
How to run JavaFX on Docker
How to use Bio-Formats on Ubuntu 20.04
Upgrade from MYSQL5.7 to 8.0 on CentOS 6.7
Notes on migrating from CircleCI 1.0 to 2.0
How to install WildFly on Ubuntu 18.04
Preparing to use electron-react-boilerplate on Ubuntu 20.4
My note: Introducing Java to Ubuntu
Elmer / Ice installation (Ubuntu on WSL)
Deploy Rails on Docker to heroku
How to build vim on Ubuntu 20.04
Update MySQL from 5.7 to 8.0 with Docker
[Java] Flow from introduction of STS to confirmation of dynamic page on localhost (2/3)
[Java] Flow from introduction of STS to confirmation of dynamic page on localhost (1/3)
Grub broke after upgrading Ubuntu on Azure VM from 18.04 (LTS) to 20.04 (LTS) → Recovery
Environment construction of Ruby on Rails from 0 [Cloud9] (From Ruby version change to Rails installation)
Investigate the replacement from Docker to Podman.
Run NordVPN on Docker (Windows) Ubuntu container
Run Embulk on Docker to convert files
Language summary to learn from now on
Use docker in proxy environment on ubuntu 20.04.1
How to install production Metabase on Ubuntu
I want to install PHP 7.2 on Ubuntu 20.04.
Install Realtek network driver on Ubuntu Note
Introduced vscode with apt to docker: ubuntu
How to change the timezone on Ubuntu
[Docker] Copy files from docker container to host
[Java] Flow from source code to execution
Microservices 101-I tried putting Docker on Ubuntu-
Try putting Docker in ubuntu on WSL
Until you run apache on ubuntu on docker
Note: [Docker] How to start and stop
Run Ubuntu + ROS with Docker on Mac
Serially connect to Ubuntu on Raspberry Pi
RDP connection from Windows 10 to Ubuntu Desktop 20.04
Connect with VS Code from a Windows client to Docker on another server