For the complete documentation index, see llms.txt. This page is also available as Markdown.

Direct upload and download

Get Endpoint via Float16

This tutorial guides you through upload and download using Float16's storage.

  • Float16 CLI installed

  • Logged into Float16 account

  • VSCode or preferred text editor recommended

Step 1 : Create and start the project

float16 project create --instance h100
float16 project start

If you didn't start the project, You can't use storage command before start the project.

Step 2 : Prepare the script

https://github.com/float16-cloud/examples/tree/main/official/spot/torch-train-and-infernce-mnist

(download-mnist-datasets.py)

import os
from torchvision import datasets, transforms

def download_mnist(data_path):
    if not os.path.exists(data_path):
        os.makedirs(data_path)
    
    transform = transforms.Compose([
        transforms.ToTensor(),
        transforms.Normalize((0.1307,), (0.3081,))
    ])

    # Download training data
    train_dataset = datasets.MNIST(root=data_path, train=True, download=True, transform=transform)
    
    # Download test data
    test_dataset = datasets.MNIST(root=data_path, train=False, download=True, transform=transform)

    print(f"MNIST dataset downloaded and saved to {data_path}")

if __name__ == "__main__":
    data_path = "../mnist-datasets"  # You can change this to your preferred location
    download_mnist(data_path)

Step 3.1 : Upload via CLI

After downloaded. Use this command to upload datasets directory to remote path.

  • The storage upload command use direct connect between your local machine direct to

Step 3.2 : Upload via Website

Step 4.1 : Download the file(s) via CLI

Step 4.2 : Download the file(s) via Website

Explore More

Learn how to use Float16 CLI for various use cases in our tutorials.

Happy coding with Float16 Serverless GPU!

Last updated