Deka GPU Documentations
  • Starter Guide
    • Introduction
    • Sign Up
    • Choose a Package
    • Top Up
    • Create a Virtual Machine
    • Download kubeconfig
    • Create a Deka LLM
    • Create a Deka Notebook
    • Conclusion
  • Service Portal
    • Introduction
    • Sign Up
    • Sign In
    • Sign Out
    • Forgot Password
    • Account Setting
      • Using MFA Google Authenticator
      • Using MFA Microsoft Authenticator
    • Project
      • Add Project
      • Delete Project
    • List Roles
    • Broadcast
    • Audit Log
    • Voucher
      • Voucher Trial
      • Voucher Credit
    • Security
      • AI Security AI Infrastructure Layer
      • AI Security AI Application Layer
    • Ticket
      • Create Ticket
      • Add Attachment
      • Discussion
      • Detail Ticket
    • Billing
      • Daily Cost Estimated
      • Monthly Cost
      • Invoice
      • Summary Monthly
    • Balance
      • Project Type: SME
        • GPU Merdeka
        • Choose Package
        • Top-Up
      • Project Type: Enterprise
      • History Balance
        • Balance
        • Transaction
      • Custom Resource Definition
  • Deka GPU
    • Deka GPU: Kubernetes
      • Introduction
      • GPU Type
      • Dashboard
        • Check Status Kubernetes
        • Download Kube Config
        • Access Console
      • Workloads
        • Pods
          • Create New Pod
          • Access Console
          • Configuration Pod
          • Delete Pod
          • How to Create a New Pod use CLI
        • Deployments
          • Create New Deployment
          • Configuring Deployment
          • Delete of a Deployment
          • How to Create a New Deployment use CLI
        • DaemonSets
          • Create a New DaemonSet
          • Configuring a DaemonSet
          • Delete DaemonSet
      • Services
      • Storages
        • Storage Class
        • Persistent Volume Claims
          • Create a New Persistent Volume Claim
          • How to Create a New Persistent Volume Claim use CLI
      • Resources
        • Ingresses
          • Create a New Ingresses
          • Configuring Ingresses
          • Delete Ingresses
        • Ingresses Classes
          • Create a New Ingresses Classes
          • Configuring Ingresses Classes
          • Delete Ingresses Classes
        • Secrets
          • Create a New Secret
          • Configuring a Secrets
          • Delete a Secrets
        • Config Maps
          • Create a New Config Maps
          • Configuring a Config Map
          • Delete a Config Map
      • Service Accounts
        • Service Accounts
          • Create a New Service Account
          • Configuring a Service Account
          • Delete Service Account
        • Roles
          • Create a New Roles
          • Configuring Roles
          • Delete Roles
        • Cluster Roles
          • Create a New Cluster Role
          • Configuring Cluster Role
          • Delete Cluster Role
        • Cluster Role Bindings
          • Create a New Role Binding
          • Configuring Role Bindings
          • Delete Cluster Role Binding
    • Deka GPU: VMs
      • Operating System
      • GPU Type
      • Machine Type
      • Namespace Type
      • Storage Class
      • How to Create a Virtual Machine on Service Portal
      • How to Manually Create a Virtual Machine
        • Download Kube Config
        • Running Kube Config
        • Configuration file dv.yaml
        • Configuration file vm.yaml
        • Configuration file svc.yaml
      • Feature Overview of Virtual Machine
        • Detail a Virtual Machine
        • Open Console
        • Turn Off a VM Instance
        • Turn On a VM Instance
        • Restart a Virtual Machine
        • How to Access Console
        • Show YAML File
      • Delete a Virtual Machine
    • Deka GPU: Registry
      • Create Registry
      • Quota
      • Detail Registry
        • Summary
        • Repository
        • Logs
        • Labels
        • Tag Immutability
        • Member
        • Resize Storage Registry
      • Delete Registry
    • Deka GPU: Security
      • Deka Guard
        • Introduction
        • Create Guard to Deny All Ingress
        • Create Guard to Allow Ingress
        • Create Guard to Allow Ingress with port
        • Create Guard to Allow Ingress with IP/CIDR
        • Create Guard to Deny All Egress
        • Create Guard to Allow Egress
        • Create guard to Allow Egress with Port
        • Create Guard to Allow Egress with IP/CIDR
    • Deka GPU: Service
      • Ingress
        • Install Ingress nginx
        • Install Cert Manager
        • Create Cluster Issuer
        • Create Ingress with TLS
    • Deka GPU: Autoscaling
      • Basic Autoscaling
    • Deka GPU: Network
      • Deka VPC
    • Deka GPU: MLOps
      • Introduction
      • Notebook
      • Tensorboards
      • Volumes
      • Endpoints
        • Create Endpoint
        • Delete Endpoint
      • Experiments (AutoML)
        • Create Experiments (AutoML)
        • Create Experiments (AutoML) using Python SDK
        • Get Experiments Results
      • Experiments (KFP)
        • Create Experiment
      • Pipelines
      • Runs
        • Create Run
        • Delete Active Run
      • Recurring Runs
        • Create Recurring Run
        • Delete Recurring Runs
        • Home
      • Artifacts
      • Executions
      • Manage Contributors
  • Deka Guard
    • Introduction
    • Create Deka Guard
      • Create with Form
      • Create with YAML
      • Create Deny All Igress
      • Create Deny All Egress
    • Configuration Deka Guard
    • Delete Deka Guard
  • Deka LLM
    • Introduction
    • Check Project Type
    • Create a New LLM
    • Detail Deka LLM
      • Overview Tab
      • Keys Tab
        • Create a New Key
        • Detail a Key
        • Edit a Key
        • Get a Secret Key
        • Delete a Key
      • Coin Usage Tab
      • Token Usage Tab
      • Playground Tab
      • Alert Tab
      • Top Up Coin
      • Update Models
    • API Deka LLM
      • Model Management
      • Completions
      • Embedding
    • Delete Deka LLM
    • How to Create Simple Prompt with Deka LLM
      • Create Deka LLM
      • Get URL API Deka LLM
      • Get Secret Key
      • Access API Deka LLM using Postman
      • Get Model
      • Post Chat Completions
  • Deka Notebook
    • Introduction
    • Namespace Type
    • Create a New Notebook
    • Detail Deka Notebook
      • Configuration Deka Notebook
      • Start Deka Notebook Service
      • Stop Deka Notebook Service
      • Get Token
      • Login Deka Notebook
      • Logout Deka Notebook
    • Delete Deka Notebook
  • Reference
    • How to use kubeconfig on Linux
    • How to use kubeconfig on Windows
    • Kubernetes Commands for Enhancing Security
    • How to add GPU in Kubernetes
    • How to Add GPU in VM
      • Download kubeconfig
      • Install kubectl
      • Add GPU
      • Install Driver NVIDIA
    • RAPIDS
      • How to Setup RAPIDS
      • How to make Custom Image
    • How to push image with Docker
    • Deployment LLaMA 3.1 70B with VLLM on Kubernetes
      • Getting the Hugging Face API Key
      • Requesting Access to the LLaMA Model
      • Connect Kubernetes on Computer
      • Create Namespace
      • Create PersistentVolumeClaim (PVC)
      • Create Secret for Hugging Face Token
      • Create Deployment
      • Create Service
      • Verify Deployment
      • Accessing the LLaMA Service
      • Troubleshooting
    • How to Get an API Key on NGC
    • Deployment LLM with Deka GPU + NIM
    • Deployment Deepseek R1 70B with VLLM on Deka GPU's Kubernetes
      • Prerequisites
      • Create Namespace
      • Create PersistentVolumeClaim (PVC)
      • Create Deployment
      • Create Service
      • Verify Deployment
      • Accessing the Deepsek Service
      • Troubleshooting
    • How to Upload and Download on FTP Web
  • Troubleshooting
    • Reinstall Driver NVIDIA on Linux
    • NVIDIA Driver Not Detected After Upgrade Kernel
Powered by GitBook
On this page
  • Create a Docker File
  • Access the NGC Catalog Container
  • Building a docker image
  • Upload images to Docker Hub
  • Pull Image for MLOps
  1. Reference
  2. RAPIDS

How to make Custom Image

PreviousHow to Setup RAPIDSNextHow to push image with Docker

Last updated 3 months ago

To use a Custom Image when creating Notebooks on the Deka GPU Portal Service, there are five stages, namely:

Create a Docker File

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.

Add Text Document

Enter the following syntax into the newly created Text Document file.

# Use an argument to allow the base image to be customizable 
FROM {BASE_IMAGE} 
# Switch to root to perform installations 
USER root  
# Define user and group ID, allowing customization 
ARG UID=10001 
ARG GID=10001 
RUN groupadd -g "${GID}" jovyan \ 
  && useradd jovyan --create-home --no-log-init -g jovyan -u "$UID" 
# Update system packages and install commonly used packages 
RUN apt-get update && apt-get install -y \ 
	python3-pip \ 
	libcurl4-openssl-dev \ 
	curl \ 
	zlib1g-dev \ 
	git \ 
	pkg-config \ 
	python3 \ 
	python3-dev \ 
	python3-wheel \ 
	g++ \ 
	libglib2.0-dev \ 
	libglib2.0-dev-bin \ 
	python-gi-dev \ 
	libtool\ 
	m4 \ 
	autoconf \ 
	automake \ 
	sudo \ 
	ssh \ 
	pbzip2 \ 
	pv \ 
	bzip2\ 
	unzip \ 
	build-essential \ 
	# Additional packages commonly used 
	python3-opencv \ 
	python3-matplotlib \ 
	python3-numpy \ 
	python3-scipy \ 
	python3-pandas \ 
	python3-sklearn \ 
	&& rm -rf /var/lib/apt/lists/* 
  
# Install JupyterLab 
RUN pip3 install jupyterlab 
  
# Set the working directory and copy the application code 
COPY . /app 
WORKDIR /app 
  
# Set environment variables for JupyterLab 
ENV NB_PREFIX / 
  
# Command to run JupyterLab with appropriate options 
CMD ["sh", "-c", "jupyter lab --notebook-dir=/home/jovyan --ip=0.0.0.0 --no-browser --allow-root --port=8888 --NotebookApp.token='' --NotebookApp.password='' --NotebookApp.allow_origin='*' --NotebookApp.base_url=${NB_PREFIX}"] 

If you have copied the syntax, the next step is to save the text document file with the name Dockerfile.

Access the NGC Catalog Container

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

Building a docker image

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.

docker build -f Dockerfile -t username/repository_name:tag .

Just so you know, you need to adjust the syntax to make it work. The following is an explanation of the syntax adjustments that can be made.

  • username is the name of the user or organization (repository namespace).

  • repository is the name of the repository of the Docker image.

  • tags are used to mark the image version. latest is usually used as a convention to indicate the latest version of an image.

Upload images to Docker Hub

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.

docker run -d --name rapid username/repository_name:tag

Just so you know, you need to adjust the syntax to make it work. The following is an explanation of the syntax adjustments that can be made.

  • username is the name of the user or organization (repository namespace).

  • repository is the name of the repository of the Docker image.

  • tags are used to mark the image version. latest is usually used as a convention to indicate the latest version of an image.

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.

docker push username/repository_name:tag

Just so you know, you need to adjust the syntax to make it work. The following is an explanation of the syntax adjustments that can be made.

  • username is the name of the user or organization (repository namespace).

  • repository is the name of the repository of the Docker image.

  • tags are used to mark the image version. latest is usually used as a convention to indicate the latest version of an image.

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 for MLOps

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.

Dockerfile.txt

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 .

Open NGC Catalog
Copy Tag
Paste Tag in Dockerfile.txt
Delete extention Dockerfile
Build Docker Image
Run Syntax
Push Image
Docker Hub
Use Custom Image
Notebooks use Custom Image
this link
Page cover image