conda
- If you’d prefer that conda’s base environment not be activated on startup, set the auto_activate_base parameter to false:
1
conda config --set auto_activate_base false
jupyter
-
This will show you the URLs of running servers with their tokens, which you can copy and paste into your browser.
1
jupyter notebook list
-
jupyter server password
-
docker + tensorflow-gpu + jupyterlab
- docker run -d –gpus all -p 8888:8888 -p 6006-6009:6006-6009 –restart=always –name=tensorflow -v /home/fang:/tf/fang tensorflow/tensorflow:latest-gpu-jupyter
- docker exec -it tensorflow pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
- docker exec -it tensorflow pip install jupyterlab
- docker exec -it tensorflow jupyter server password
- cd /var/lib/docker/containers/your container id
- docker stop tensorflow && sed -i ‘s/jupyter notebook/jupyter lab/g’ config.v2.json
- sudo systemctl restart docker
-
notebook config
-
c.ServerApp.token = ‘xfangfang’
-
c.ServerApp.quit_button = False
-
1
c.ServerApp.terminado_settings = {'shell_command': ['/bin/bash']}
-
docker
-
docker run –rm –gpus all nvidia/cuda:11.0-base nvidia-smi
-
1
docker run -d --gpus all -p 8888:8888 --restart=always --name=tensorflow -v /home/fang:/tf/fang tensorflow/tensorflow:latest-gpu-jupyter
-
docker exec -it tensorflow python - c “import requests; requests.get(‘http://baidu.com’)”
-
1
docker commit tensorflow xfangfang/tensorflow-gpu-jupyter:v0.1
shell
-
Shows CPU freq
1 2 3
watch -n 0 "cat /proc/cpuinfo | grep -i mhz" # or cpupower -c all frequency-info
-
设置所有CPU为性能模式:
1
cpupower -c all frequency-set -g performance
-
设置所有CPU为节能模式:
1
cpupower -c all frequency-set -g powersave
-
nvme smart-log /dev/nvme0
-
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
node
apt install npm
npm config set registry http://registry.npm.taobao.org/
npm install n -g
n lts