訓練:Windows 10/11 WSL2 Ubuntu
nvidia-smi |
wsl --install |
wget https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/cuda-wsl-ubuntu.pin |
sudo mv cuda-wsl-ubuntu.pin /etc/apt/preferences.d/cuda-repository-pin-600 |
wget https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda-repo-wsl-ubuntu-11-8-local_11.8.0-1_amd64.deb |
sudo dpkg -i cuda-repo-wsl-ubuntu-11-8-local_11.8.0-1_amd64.deb |
sudo cp /var/cuda-repo-wsl-ubuntu-11-8-local/cuda-*-keyring.gpg /usr/share/keyrings/ |
sudo apt-get update |
sudo apt-get -y install cuda |
sudo dpkg -i cudnn-local-repo-ubuntu2204-8.7.0.84_1.0-1_amd64.deb |
sudo cp /var/cudnn-local-repo-*/cudnn-local-*-keyring.gpg /usr/share/keyrings/ |
sudo apt-get update |
sudo apt-get install libcudnn8=8.7.0.84-1+cuda11.8 |
sudo apt-get install libcudnn8-dev=8.7.0.84-1+cuda11.8 |
sudo apt-get install libcudnn8-samples=8.7.0.84-1+cuda11.8 |
sudo apt install python3.10-venv |
python3 -m venv --system-site-packages ~/venv |
source ~/venv/bin/activate |
pip install --upgrade pip |
pip install tensorflow==2.14 |
pip install numpy==1.26.4 |
pip install pillow |
pip install matplotlib |
mkdir ~/AI_Driver |
cd ~/AI_Driver |
wget http://ma2.la.coocan.jp/AI_Driver/webot/download/train.py |
wget https://raw.githubusercontent.com/mituhiromatuura/AI_Driver/main/maketensor.py |
sudo apt install zip unzip |
sudo apt install openssh-server |
source ~/venv/bin/activate |
cd ~/AI_Driver |
wget http://ma2.la.coocan.jp/AI_Driver/tt02/windows/log_202309271634_d.zip |
unzip log_202309271634_d.zip |
time python train.py log 6 |
export CUDA_VISIBLE_DEVICES=0 | 使う |
export CUDA_VISIBLE_DEVICES= | 使わない |