TensorFlow中怎么搭建JupyterLab 環(huán)境,針對這個問題,這篇文章詳細(xì)介紹了相對應(yīng)的分析和解答,希望可以幫助更多想解決這個問題的小伙伴找到更簡單易行的方法。
創(chuàng)新互聯(lián)建站是專業(yè)的盂縣網(wǎng)站建設(shè)公司,盂縣接單;提供成都做網(wǎng)站、成都網(wǎng)站制作,網(wǎng)頁設(shè)計,網(wǎng)站設(shè)計,建網(wǎng)站,PHP網(wǎng)站建設(shè)等專業(yè)做網(wǎng)站服務(wù);采用PHP框架,可快速的進(jìn)行盂縣網(wǎng)站開發(fā)網(wǎng)頁制作和功能擴展;專業(yè)做搜索引擎喜愛的網(wǎng)站,專業(yè)的做網(wǎng)站團隊,希望更多企業(yè)前來合作!
Ubuntu 18.04.5 LTS (Bionic Beaver)
ubuntu-18.04.5-desktop-amd64.iso
CUDA 11.2.2
cuda_11.2.2_460.32.03_linux.run
cuDNN 8.1.1
libcudnn8_8.1.1.33-1+cuda11.2_amd64.deb
libcudnn8-dev_8.1.1.33-1+cuda11.2_amd64.deb
libcudnn8-samples_8.1.1.33-1+cuda11.2_amd64.deb
Anaconda Python 3.8
Anaconda3-2020.11-Linux-x86_64.sh
conda activate base
Anaconda 環(huán)境里已有,如下查看版本:
jupyter --version
不然,如下進(jìn)行安裝:
conda install -c conda-forge jupyterlab
創(chuàng)建虛擬環(huán)境 tf
,再 pip
安裝 TensorFlow:
# create virtual environment conda create -n tf python=3.8 -y conda activate tf # install tensorflow pip install --upgrade pip pip install tensorflow
測試:
$ python - < 2021-04-01 11:18:17.719061: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0 2.4.1 True 2021-04-01 11:18:18.437590: I tensorflow/compiler/jit/xla_cpu_device.cc:41] Not creating XLA devices, tf_xla_enable_xla_devices not set 2021-04-01 11:18:18.437998: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcuda.so.1 2021-04-01 11:18:18.458471: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2021-04-01 11:18:18.458996: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1720] Found device 0 with properties: pciBusID: 0000:01:00.0 name: GeForce RTX 2060 computeCapability: 7.5 coreClock: 1.35GHz coreCount: 30 deviceMemorySize: 5.79GiB deviceMemoryBandwidth: 245.91GiB/s 2021-04-01 11:18:18.459034: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0 2021-04-01 11:18:18.461332: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublas.so.11 2021-04-01 11:18:18.461362: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublasLt.so.11 2021-04-01 11:18:18.462072: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcufft.so.10 2021-04-01 11:18:18.462200: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcurand.so.10 2021-04-01 11:18:18.462745: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcusolver.so.10 2021-04-01 11:18:18.463241: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcusparse.so.11 2021-04-01 11:18:18.463353: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudnn.so.8 2021-04-01 11:18:18.463415: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2021-04-01 11:18:18.463854: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2021-04-01 11:18:18.464170: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1862] Adding visible gpu devices: 0 [PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU')]Solution: Could not load dynamic library 'libcusolver.so.10'
cd /usr/local/cuda/lib64 sudo ln -sf libcusolver.so.11 libcusolver.so.10安裝 IPython kernel
在虛擬環(huán)境
tf
里,安裝ipykernel
與 Jupyter 交互。# install ipykernel (conda new environment) conda activate tf conda install ipykernel -y python -m ipykernel install --user --name tf --display-name "Python TF" # run JupyterLab (conda base environment with JupyterLab) conda activate base jupyter lab另一種方式,可用 nb_conda 擴展,其于筆記里會激活 Conda 環(huán)境:
# install ipykernel (conda new environment) conda activate tf conda install ipykernel -y # install nb_conda (conda base environment with JupyterLab) conda activate base conda install nb_conda -y # run JupyterLab jupyter lab最后,訪問 http://localhost:8888/ :
關(guān)于TensorFlow中怎么搭建JupyterLab 環(huán)境問題的解答就分享到這里了,希望以上內(nèi)容可以對大家有一定的幫助,如果你還有很多疑惑沒有解開,可以關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道了解更多相關(guān)知識。
新聞名稱:TensorFlow中怎么搭建JupyterLab環(huán)境
當(dāng)前路徑:http://weahome.cn/article/pohsod.html