In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces "the process of Docker deploying tensorflow-gpu-jupyterlab". In daily operation, I believe many people have doubts about the process of deploying tensorflow-gpu-jupyterlab in Docker. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about "the process of Docker deploying tensorflow-gpu-jupyterlab". Next, please follow the editor to study!
1. Download docker image
Docker pull tensorflow/tensorflow:latest-gpu-jupyter
View docker images when the download is complete
two。 Create a container
Nvidia-docker run-d\
-v / home/work/heyile:/tf/lab\
-p 8880 purl 8888\
-- name hyllab\
Tensorflow/tensorflow:latest-gpu-jupyter
After creation, view the container process through docker ps:
View the startup log through docker logs hyllab
3. Install integrated jupyterlab
Since jupyter notebook is enabled by default in this image, and jupyter lab looks better, we also integrate jupyter lab:
Docker exec-it hyllab bash
Exit when the pip install jupyterlab download is complete.
The container starts jupyter notebook by default, and we modify the startup command by modifying the configuration file of the container.
Docker ps, write down containerid.
As shown in the figure: containerid: bc05d4cfd3f6
Docker stop hyllab stops the container.
Change the directory to the directory under the docker program directory that starts with containerid, as follows:
Cd / var/lib/docker/containers/bc05d4cfd3f6895bc9ac3bf1d194a8de127634887d8f994a5de809a56caad422
Vi config.v2.json as shown in the following figure, change the jupyter notebook startup command in 2 locations to jupyter lab, and the following figure has been modified.
Then restart the docker service systemctl restart docker, and then start the tensorflow container, such as docker start hyllab
Check the log to see that the jupyter lab service has been started.
Docker logs hyllab
You can log in successfully by logging in to jupyter lab address http://127.0.0.1:8888/?token=874de4249fcb11143ca2e0db722a146e758b014243f4ee05
4. Verify that docker can call GPU
Docker exec-it hyllab bash into the container, execute nvidia-smi to view the gpu list
You can view GPU by executing code through jupyter lab
At this point, the study on "the process of Docker deploying tensorflow-gpu-jupyterlab" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.