2019 0505
import tensorflow as tf
print(tf.__version__)
conda list --export > /code_dir/tf2package-list.txt
conda list --export > /code_dir/torch02package-list.txt
conda list --export > /code_dir/caffe1package-list.txt
conda list --export > /code_dir/mxnet012package-list.txt
git clone http://202.38.69.240:10070/Mr.X/ENV_README
git add .
git commit -m "ss"
git config --global user.email "[email protected]"
git config --global user.name "Mr.X"
git commit -m "ss"
git push origin master
2019年4.22 - 4.26
输出集群上的conda list
import tensorflow as tf
print(tf.__version__)
conda list --export > /code_dir/tf2package-list.txt
conda list --export > /code_dir/torch02package-list.txt
conda list --export > /code_dir/caffe1package-list.txt
conda list --export > /code_dir/mxnet10package-list.txt
# -*-coding:utf-8-*-
import os
old_txt_path = '/root/桌面/old_list/'
new_txt_path = '/root/桌面/new_list/'
for j, old_txt in enumerate([i for i in os.listdir(old_txt_path) if '.txt' in i]):
old_file = open(old_txt_path + old_txt)
new_file = open(new_txt_path + old_txt, mode='w')
all_lines = old_file.readlines()
for line in all_lines:
if line.rfind('=') > 0:
# print(line[0:line.rfind('=')])
new_file.write(str(line[0:line.rfind('=')]))
new_file.write('\n')
old_file.close()
2018年 3.11 - 3.15
使用dockerfile文件创建镜像:docker build -t tf_1.12_py3_test -f tensorflow-1.12-py3.Dockerfile .
运行一个容器,并与宿主机共享数据卷:nvidia-docker run -it --name tf_1.12_test -v /media/root/d729c5f9-fc3a-4360-bcc6-9a536f455fba/Whales:/data 4c7dfc2ac60d /bin/bash
2019年 3.18 - 3.22
测试NLP代码:
cd home
git clone https://github.com/jiegzhan/multi-class-text-classification-cnn-rnn.git
docker cp /root/桌面/multi-class-text-classification-cnn-rnn 2a611ef5caec:/home/
cd /home
cd ./multi-class-text-classification-cnn-rnn && pip install pandas && pip install sklearn && pip install gensim && python train.py ./data/train.csv.zip ./training_config.json
查看CUDA/CUDNN版本:
env
安装TensorRT
docker cp /root/桌面/TensorRT-5.1.2.2 689dd7a6f789:/home/
vim ~/.bashrc
export LD_LIBRARY_PATH=/home/TensorRT-5.1.2.2/lib:$LD_LIBRARY_PATH
source ~/.bashrc
cd /home/TensorRT-5.1.2.2/python
pip install tensorrt-5.1.2.2-cp36-none-linux_x86_64.whl
python
import tensorrt
测试官方命令:
docker cp /root/桌面/tftrt 689dd7a6f789:/home/
cd /home/tftrt/
./run_all.sh
cd home
wget https://developer.download.nvidia.cn/devblogs/tftrt_sample.tar.xz
tar -xvf tftrt_sample.tar.xz
cd tftrt
./run_all.sh
2019年4月2日 tensor2tensor 报错
测试命令:
t2t-trainer
2019年4月3日
一。Dockerfile命令:RUN conda install -y opencv
安装完毕,opencv=4.0.1
运行 import cv2 报错 ImportError: libGL.so.1: cannot open shared object file: No such file or directory
安装 conda install py-opencv
安装完毕 opencv=3.4.2 py-opencv=3.4.2
运行 import cv2 ,报错 ImportError: numpy.core.multiarray failed to import
安装 conda install numpy
安装完毕,opencv=3.4.2, py-opencv=3.4.2
运行 import cv2 ,好了
安装 conda install opencv,
安装完毕,opencv=4.0.1
报错 ImportError: libGL.so.1: cannot open shared object file: No such file or directory
二。Dockerfile命令:RUN conda install -y py-opencv
安装完毕,py-opencv=3.4.2
运行 import cv2, 好了
安装 conda install opencv==4.0.1
安装完毕,opencv=4.0.1
运行 import cv2,报错 ImportError: libGL.so.1: cannot open shared object file: No such file or directory
三。修改Dockerfile之后测试结果:
tensorflow-1.7-py3 没问题
torch-0.3-py3 没问题