How to make Custom Image
Last updated
Last updated
To use a Custom Image when creating Notebooks on the Deka GPU Portal Service, there are five stages, namely:
Docker is a text file that contains a series of instructions for Docker to build an image. Open File Explorer on your computer, press the New button, select Text Document.
Enter the following syntax into the newly created Text Document file.
If you have copied the syntax, the next step is to save the text document file with the name Dockerfile.
NGC Catalog Container is a Docker container image that has been optimized and configured by NVIDIA to run various AI/ML and HPC applications and frameworks efficiently on NVIDIA GPUs. This container includes AI/ML Framework, Data Science Library, HPC Application. Open the NGC Catalog Container by pressing this link.
Select the Tags tab and then select the image tag to be copied. On this guide copy the tag 24.08-cuda11.8-py3.10 and press the copy icon.
Paste the copied image tag into the {BASE_IMAGE} section of the Dockerfile.txt file
Save the changes you have made and delete the .txt extension in the Dockerfile.txt file
On your computer open Command Prompt or Powershell and run the syntax to build a docker image. If you already understand the syntax changes according to your needs, then run the syntax below with the adjustments above.
To be able to proceed to the next stage, you need to make sure docker run is running to ensure there are no failures when running MLOps via Docker Desktop. If you already understand the syntax changes according to your needs, then run the syntax below with the adjustments above.
In the figure above, by running the syntax above, it can be concluded that the rapid container uses the Container ID, namely b74e775c37ca, and the rapid container is run from the azerap/rapids image with the latest tag currently running and the time that has passed since this container was run is about 1 hour ago. The log notes that ServerApp from Jupyter was successfully started on 2024-09-19 at 17:52:35. Jupyter Server runs on the URLs http://127.0.0.1:8888/lab and http://b74e775c37ca:8888/lab. This is the URL where you can access the JupyterLab interface running inside the container. 127.0.0.1 is the local IP address (localhost), and b74e775c37ca is the hostname of this container.
Back on your computer run Command Prompt or Powershell and upload the Docker image from the local machine to Docker Hub so that it can be accessed by other users or machines to pull and run as a container. Worth noting You need to adjust the syntax to make it work. If you already understand the syntax changes according to your needs, then run the syntax below with the adjustments above.
The figure above shows the process of uploading the azerap/rapids:latest image to Docker Hub from your local computer. This process consists of uploading layers one by one, checking which layers are already in the registry, and displaying the size of the layer being uploaded. Once all layers are complete, the azerap/rapids:latest image is now available in Docker Hub and can be pulled from the registry by other machines.
Pull image is the process of downloading a Docker image from Docker Hub to a local machine for use in MLOps on the Cloudeka Portal Service. In the previous stage, you have successfully uploaded the image to Docker Hub. If the image is available in Docker Hub, it will appear as shown in the image below.
If the image has appeared and is public, then we can use it when creating new notebooks in the MLOps menu on the Deka GPU Portal Service. Enter the name of the repository that was successfully uploaded into the Custom Image column.
If the image from Docker Hub has been used on notebooks, it can be seen as in the image below.