Neusport Academy cluster docker instructions

If you want to make changes to a certain image and upload it to the node, there are two steps. They are the packaging and uploading of the image.

1. Image package:

1. Log in to the server through the terminal: ssh [email protected]

2. Check which images are available: docker images

3. Select a basic image and install the required libraries on this image;

                  Create and start the container: docker run -dit --name ubuntuFirst image id /bin/bash

                  Enter the container: docker exec -it ubuntuFirst /bin/bash

                 Install files here: pip install etc.

4. The required library has been installed through the above method, and a new terminal needs to be opened, and it is packaged into a new image by logging in to the server.

          docker commit -m "install python3.7" containerID(镜像ID)  ansheng_pytorch:v1.0

5. At this point, the new image has been encapsulated. You can go to the first terminal to close the image that docker is running, and delete it, otherwise it will consume hard disk space.

      Exit the container: exit

     Kill the process: docker kill containerID

     Delete the container: docker rm containerID

2. Upload the image to the server node

SSH login ssh [email protected]

docker login 219.216.99.4:8888 Enter the corresponding harbor username and password

docker tag ansheng_pytorch:v1.0  219.216.99.4:8888/neusport/ansheng_pytorch:v3.0

docker push 219.216.99.4:8888/neusport/ansheng_pytorch:v3.0

Note here that it can only be uploaded to the mirror warehouse neusport, other folders are not easy to use.

The 219.216.99.4:8888/neusport/ansheng_pytorch:v3.0 image below this file can use pytohn tt.py to call normal libraries. The python3 ttt.py command cannot be used. torch 1.1 torchvision 0.3 sklearn scipy visdom pdb These basic libraries are available. Can be used directly.

 

Guess you like

Origin blog.csdn.net/t20134297/article/details/107781482