Ubuntu
172.18.32.248
192.168.143.248:6080
ssh node1
-
CUDA_VISIBLE_DEVICES
-
nvidia-smi
-
sudo gedit ~/.bashrc
-
source activate tensorflow
conda list -
ifconfig -a
192.168.143.204
192.168.141.126 -
conda install
pip install --user
-
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
# 设置搜索时显示通道地址
conda config --set show_channel_urls yes -
import os
os.environ[“CUDA_VISIBLE_DEVICES”] = “3” -
conda create -n venv2 python=3.6
[清华镜像](https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/)
bash Anaconda3-5.2.0-Linux-x86_64.sh
conda install tensorflow-gpu=1.14.0
conda install keras=2.2.4
pip install opencv-python
conda install matplotlib
conda install cudatoolkit=10.1.243
conda install cudnn=7.6.5
conda install matplotlib
conda install pytorch==1.0.0 torchvision==0.2.1 cuda90 -c pytorch
-
anaconda search -t conda name
anaconda show -
sudo su
-
sudo gedit
-
labelme_json_to_dataset <文件名>.json
-
CUDA_VISIBLE_DEVICES=0 python train.py
-
tensorboard --logdir=文件路径
-
kill -9 PID
-
查看所有环境: conda info --envs
-
查看CUDA: nvcc -v
-
查看服务器地址:
ifconfig -
添加环境变量:
vim ~/.bashrc
or
gedit ~/.bashrc
source ~/.bashrc
export PATH=/mnt/yuanshuo/anaconda3/bin:$PATH
vim .bashrc可以对bashrc进行更改,任何可以用vim进行修改的内容,如果想退出编辑模式回到命令行界面,只需要先按Esc,然后输入
如果是vi,则:Esc 退出编辑模式,输入以下命令:
:wq 保存后退出vi,若为 :wq! 则为强制储存后退出(常用) -
安装命令:bash Anaconda3-2020.07-Linux-x86_64.sh
-
新建文件夹:mkdir name
删除文件夹:rm -r name -
vim . bash_profile
-
#Tensorflow 按需分配内存
gpu_options = tf.compat.v1.GPUOptions(allow_growth=True)
sess = tf.compat.v1.Session(config=tf.compat.v1.ConfigProto(gpu_options=gpu_options))
added by Anaconda3 installer
export PATH="/mnt/shuoyuan/anaconda3/bin:$PATH"
export LD_LIBRARY_PATH=
L
D
L
I
B
R
A
R
Y
P
A
T
H
:
/
u
s
r
/
l
o
c
a
l
/
c
u
d
a
/
l
i
b
64
e
x
p
o
r
t
P
A
T
H
=
LD_LIBRARY_PATH:/usr/local/cuda/lib64 export PATH=
LDLIBRARYPATH:/usr/local/cuda/lib64exportPATH=PATH:/usr/local/cuda/bin
export CUDA_HOME=/usr/local/cuda
export PATH=/media/yehao/常用软件/shuo/anaconda3/bin:
P
A
T
H
e
x
p
o
r
t
L
D
L
I
B
R
A
R
Y
P
A
T
H
=
"
/
u
s
r
/
l
o
c
a
l
/
c
u
d
a
−
9.0
/
l
i
b
64
:
PATH export LD_LIBRARY_PATH="/usr/local/cuda-9.0/lib64:
PATHexportLDLIBRARYPATH="/usr/local/cuda−9.0/lib64:LD_LIBRARY_PATH"
export LIBRARY_PATH=
L
I
B
R
A
R
Y
P
A
T
H
:
/
u
s
r
/
l
o
c
a
l
/
c
u
d
a
−
9.0
/
l
i
b
64
e
x
p
o
r
t
L
D
L
I
B
R
A
R
Y
P
A
T
H
=
LIBRARY_PATH:/usr/local/cuda-9.0/lib64 export LD_LIBRARY_PATH=
LIBRARYPATH:/usr/local/cuda−9.0/lib64exportLDLIBRARYPATH=LD_LIBRARY_PATH:/usr/local/cuda-9.0/extras/CUPTI/lib64
export PYTHONPATH=$PYTHONPATH:"/media/yehao/常用软件/shuo/anaconda3/envs/tensorflow/lib/python3.6/site-packages/tensorflow/contrib/slim/python:/media/yehao/常用软件/shuo/anaconda3/envs/tensorflow/lib/python3.6/site-packages/tensorflow/contrib/slim/python/slim/"
export PATH=//media/lxin/程序/anaconda3/bin:
P
A
T
H
e
x
p
o
r
t
P
A
T
H
=
/
u
s
r
/
l
o
c
a
l
/
c
u
d
a
−
9.0
/
b
i
n
:
PATH export PATH=/usr/local/cuda-9.0/bin:
PATHexportPATH=/usr/local/cuda−9.0/bin:PATH
export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64:
L
D
L
I
B
R
A
R
Y
P
A
T
H
e
x
p
o
r
t
L
I
B
R
A
R
Y
P
A
T
H
=
LD_LIBRARY_PATH export LIBRARY_PATH=
LDLIBRARYPATHexportLIBRARYPATH=LIBRARY_PATH:/usr/local/cuda-9.0/lib64
export LD_LIBRARY_PATH=
L
D
L
I
B
R
A
R
Y
P
A
T
H
:
/
u
s
r
/
l
o
c
a
l
/
c
u
d
a
−
9.0
/
e
x
t
r
a
s
/
C
U
P
T
I
/
l
i
b
64
e
x
p
o
r
t
L
D
L
I
B
R
A
R
Y
P
A
T
H
=
/
m
e
d
i
a
/
l
x
i
n
/
程
序
/
a
n
a
c
o
n
d
a
3
/
l
i
b
/
:
LD_LIBRARY_PATH:/usr/local/cuda-9.0/extras/CUPTI/lib64 export LD_LIBRARY_PATH=/media/lxin/程序/anaconda3/lib/:
LDLIBRARYPATH:/usr/local/cuda−9.0/extras/CUPTI/lib64exportLDLIBRARYPATH=/media/lxin/程序/anaconda3/lib/:LD_LIBRARY_PATH
export PATH="/home/yuanshuo/.local/bin/labelme:KaTeX parse error: Expected 'EOF', got '#' at position 7: PATH" #̲PKG_CONFIG_PATH…PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
#export PKG_CONFIG_PATH
__conda_setup="$(’/media/yehao/常用软件1/shuo/anaconda3/bin/conda’ ‘shell.bash’ ‘hook’ 2> /dev/null)"
if [
?
−
e
q
0
]
;
t
h
e
n
e
v
a
l
"
? -eq 0 ]; then eval "
?−eq0];theneval"__conda_setup"
else
if [ -f “/media/yehao/常用软件1/shuo/anaconda3/etc/profile.d/conda.sh” ]; then
. “/media/yehao/常用软件1/shuo/anaconda3/etc/profile.d/conda.sh”
else
export PATH="/media/yehao/常用软件1/shuo/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<