Run Jupyter Notebook on GPU Container with a Few Clicks
Table of Contents
Overview of GPU Container
GPU Container is a preconfigured, enterprise-grade solution designed to accelerate machine learning and data science workflows. GPU Container enables users to deploy GPU-accelerated containers that seamlessly integrate with Jupyter Notebook, providing a robust environment for developing and training machine learning models. By leveraging NVIDIA GPUs and Containerization technology, this feature delivers high-performance computing with both flexibility and scalability.
Key Benefits of GPU Container Platform
This guide introduces GPU Container and provides a comprehensive, step-by-step guide for setting up and using it to develop machine learning models with Jupyter Notebook.
Prerequisites:
AI Factory account with at least $5 in your account so you can experiment GPU Container without interuption in 1 or 2 hours
GPU Container is now available on FPT AI Factory, follow the steps below to spin up your GPU Container on FPT AI Factory .
Visit ai.fptcloud.com and switch to GPU Container dashboard, you can see details about your running, paused and stopped containers, all in one place.
GPU Container feature allows you to choose a flavor based on your computational needs. You can select from 1 to 8 H100 NVIDIA GPUs to match your workload requirements. For example, choose 1 GPU for lightweight tasks or 8 GPUs for large-scale model training.
In the AI Factory interface, navigate to the Create New Container section. Select the desired GPU configuration (1–8 GPUs) from the configuration panel.
The platform offers multiple built-in images optimized for machine learning, as well as support for custom images. You can choose from preconfigured images provided within the platform. To select a built-in image, navigate to Template panel.
Alternatively, you can specify a custom Docker image if your project requires specific libraries or configurations by selecting Custom Template button and filling in URL to your custom image.
Customize the container’s behavior by setting environment variables and startup commands, if necessary:
For this guide, we use the default settings for the built-in Jupyter Notebook image, which automatically starts Jupyter Notebook.
Ensuring that all configuration and pricing for your GPU Container instance meets your requirements. If everything looks good, select Create Container to spin up your container.
Wait for the container to be ready. The platform will provision the container, allocate the selected GPUs, and start the Jupyter Notebook server. You can track your container’s status on the GPU Container dashboard.
Alternatively, you can click on the name of your container on the dashboard to get more information about your set up.
Once ready, the platform provides a direct link to access the Jupyter interface.
Click on the provided endpoint to gain access to Jupyter Notebook.
This section demonstrates how to upload an existing Jupyter Notebook to the GPU Container and train a YOLOv11 model for brain tumor detection.
We have prepared a notebook to demonstrate the Machine Learning/Deep Learning capability of GPU Container. Please verify the current setup.
1 H100 NVIDIA GPU is currently available in the container.
The Jupyter Notebook interface is now accessible and ready for interaction. Proceed to install the necessary packages required for model training.
After completing package installation, continue by initiating the training process.
Execute the following code snippet to start model training:
from ultralytics import YOLO # Load a model model = YOLO("yolo11m.pt") # load a pretrained model (recommended for training) # Train the model results = model.train(data="brain-tumor.yaml", epochs=10, imgsz=640, workers=0)
Model training is now in progress using the specified parameters.
After training completes, validate the model performance by running inference on a sample input.
The model completed training successfully without error. Export the trained model for deployment or future inference tasks.
Execute the following command to export the model in ONNX format:
from ultralytics import YOLO # Load a model model = YOLO("runs/detect/train/weights/best.pt") # load a custom trained model # Export the model model.export(format="onnx")
Once the model is exported, it can be downloaded to a local environment for further use.
Summary of the Workflow
This guide has demonstrated how to:
GPU Container delivers a high-performance, scalable solution for machine learning, combining GPU acceleration with the flexibility of Containerization and Jupyter Notebook for enterprise-grade applications.
Recommended Next Steps
Maximize your experience with GPU Container:
Leverage the GPU Container feature to accelerate your machine learning workflows in enterprise environments.