ubuntu 18lts 3090 安装 cuda10.0配置 stylegan2

编程入门 行业动态 更新时间:2024-10-27 08:29:13

ubuntu 18<a href=https://www.elefans.com/category/jswz/34/1764227.html style=lts 3090 安装 cuda10.0配置 stylegan2"/>

ubuntu 18lts 3090 安装 cuda10.0配置 stylegan2

ubuntu 18lts 3090 安装 cuda10.0 配置 stylegan2

  1. 安装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 |
+-----------------------------------------------------------------------------+
  1. 配置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
  1. git clone stylegan2 的仓库 cd进去

下面开始我要history看我干了啥了 有可能有疏漏

  1. 修改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
  1. 从Dockerfile构建一个干净的镜像 docker build --tag stylegan2:latest .
  2. 运行镜像
docker run --gpus all -it -v `pwd`:/scratch --user $(id -u):$(id -g) stylegan2:latest bash
  1. 连进去了 测试一下哈哈
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

本文发布于:2024-02-07 07:08:58,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1754188.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:lts   ubuntu

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!