lts 3090 安装 cuda10.0配置 stylegan2"/>
ubuntu 18lts 3090 安装 cuda10.0配置 stylegan2
ubuntu 18lts 3090 安装 cuda10.0 配置 stylegan2
- 安装ubuntu18 安装docker,这些就不讲,安装3090的gpu驱动
➜ stylegan2 git:(master) ✗ nvidia-smi
Wed Apr 20 17:17:01 2022
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 495.46 Driver Version: 495.46 CUDA Version: 11.5 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce ... Off | 00000000:01:00.0 Off | N/A |
| 0% 35C P8 10W / 370W | 217MiB / 24267MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------++-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 983 G /usr/lib/xorg/Xorg 18MiB |
| 0 N/A N/A 1033 G /usr/bin/gnome-shell 74MiB |
| 0 N/A N/A 1314 G /usr/lib/xorg/Xorg 94MiB |
| 0 N/A N/A 1444 G /usr/bin/gnome-shell 26MiB |
+-----------------------------------------------------------------------------+
- 配置nvidia-container-runtime,按照这个,具体记不清楚了,应该是两步
- /
Debian-based distributions
curl -s -L | \sudo apt-key add -
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L /$distribution/nvidia-container-runtime.list | \sudo tee /etc/apt/sources.list.d/nvidia-container-runtime.list
sudo apt-get update
- sudo apt-get install nvidia-container-runtime
- git clone stylegan2 的仓库 cd进去
下面开始我要history看我干了啥了 有可能有疏漏
- 修改Dockerfile pip加速 不然很慢的
FROM tensorflow/tensorflow:1.14.0-gpu-py3RUN pip config set global.index-url
RUN pip config set install.trusted-host mirrors.aliyunRUN pip install scipy==1.3.3
RUN pip install requests==2.22.0
RUN pip install Pillow==6.2.1
- 从Dockerfile构建一个干净的镜像
docker build --tag stylegan2:latest .
- 运行镜像
docker run --gpus all -it -v `pwd`:/scratch --user $(id -u):$(id -g) stylegan2:latest bash
- 连进去了 测试一下哈哈
root@ee0a53ccec56:/# nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Sat_Aug_25_21:08:01_CDT_2018
Cuda compilation tools, release 10.0, V10.0.130
root@ee0a53ccec56:/# cd /scratch/
root@ee0a53ccec56:/scratch# nvcc test_nvcc.cu -o test_nvcc -run
CPU says hello.
GPU says hello.
教程搬运自youtubu的视频=VVj8EvgVjLo
更多推荐
ubuntu 18lts 3090 安装 cuda10.0配置 stylegan2
发布评论