Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
uninstall old docker
apt-get update
apt-get remove docker \
docker-engine \
docker.io
install docker
apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg \
lsb-release
GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
Source
echo \
"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
Install Docker
apt-get update
apt-get install docker-ce docker-ce-cli containerd.io
Run Docker
systemctl enable docker
systemctl start docker
systemctl status docker
Get image
docker pull ubuntu:22.04
List image
docker image ls
Run container
docker run -p 8888:8888 -it ubuntu
Daemon run
docker run -p 8888:8888 -d ubuntu
List container
docker container ls <-a>
enter container
docker exec -it id bash
apt-get update
apt-get install wget bzip2 ca-certificates -y
cd /home
wget https://repo.anaconda.com/archive/Anaconda3-2023.07-2-Linux-x86_64.sh
bash Anaconda3-2023.07-2-Linux-x86_64.sh
VSCode ?no
To update conda:
conda update -n base conda
Here, if you want to install python, you can create your working environment
conda create --name env39 python=3.9
if you want to install tenserflow
conda update conda
conda create -n tf tensorflow
source activate tf
to show all the env:
conda env list
if you can’t find conda
source /root/.bashrc
to install:
conda install -c <package name>
for example:
conda install -c anaconda numpy
conda install -c conda-forge d2l
conda install -c pytorch pytorch
pip install d2l
conda install -c conda-forge matplotlib
to remove:
conda remove mumpy
other useful commands:
conda list
install Jypyter notebook:
conda install -c anaconda jupyter
jupyter notebook --ip=0.0.0.0 --no-browser --allow-root
apt-get update
apt-get install wget bzip2 ca-certificates -y
cd /home
wget https://repo.anaconda.com/archive/Anaconda3-5.1.0-Linux-x86_64.sh
bash Anaconda3-5.1.0-Linux-x86_64.sh
VSCode ?no
Here, if you want to install python, you can create your working environment
conda create –name env39 python=3.9
if you want to install tenserflow
conda create -n tf tensorflow
conda activate tf
to show all the env:
conda env list
if you can’t find conda
source /root/.bashrc
to install:
conda install -c <package name>
for example:
conda install -c anaconda numpy
to remove
conda remove mumpy
conda list
conda update conda
GCP Ubuntu install:
http://michael-harmon.com/blog/JupyterOnGCP.html
jupyter notebook --ip=0.0.0.0 --port=8888 --no-browser
https://www.yii666.com/blog/166388.html
apt-get update
apt-get install -y python3-pip
python3 -m pip install –upgrade pip
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.11/README.venv for more information.
sudo mv /usr/lib/python3.11/EXTERNALLY-MANAGED /usr/lib/python3.11/EXTERNALLY-MANAGED.old
python3 -m pip install jupyter
python3 -m pip install matplotlib
jupyter notebook –generate-config
ipython
from notebook.auth import passwd
after Jupyter Notebook 7.0, we should use:
from jupyter_server.auth import passwd;
passwd()
if sha1:
passwd(algorithm=’sha1′)