Getting started

San Francisco Compute is a market for buying time on H100 GPU clusters.

You can buy a tradable contract for a multi-node H100 cluster with InfiniBand. Then you can sell back whatever time you don’t use. Other providers prevent you from reselling in their terms of service.

You can buy any shape contract you like.

# buy 64 h100s         -n 64
# for 24 hours         -d "24h" 
# starting tomorrow    -s "tomorrow at 9am"
sf buy -n 64 -d "24h" -s "tomorrow at 9am"

You can also buy and get access to nodes right away.

# buy 8 h100s                -n 8
# for 1 hour                 -d "1hr"
# at $2.50 per GPU/hour.     -p "2.50"
sf buy -d "1hr" -n 8 -p "2.50"

In this example, you're willing to pay up to $2.50 per GPU/hour. This means the maximum total cost would be $2.50 x 8 = $20 per hour, but you may end up paying less depending on market conditions and available supply.

If you’d like, you can sell back anything you buy. Every sell order is backed by a contract, specified with the -c flag. You can see all of your contracts with sf contracts list.

Here is an example sell command.

# Sell 1024 H100s        -n 128
# for 12 hours           -d "12h"
# starting at 7pm        -s "tonight at 7pm"
# at $3.50 per GPU/hour  -p '3.50'
# from contract cont_123 -c cont_123
sf sell -c cont_123 -p '3.50' -n 128 -d '12h' -s 'tonight at 7pm'

These are orders, not reservations. By placing an order, you're signaling to the market that you're willing to buy or sell a block of compute at a certain price. You haven't actually bought or sold anything until your order gets filled.

If you place a buy order, your order won't be filled unless there's a corresponding sell order for the same amount of compute at the same price or lower.

Similarly, if you place a sell order, your order won't be filled unless there's a corresponding buy order for the same amount of compute at the same price or higher.

To cancel an order, you can run:

sf orders cancel ordr_FW6wCEr1JnFL2MSL # this is the order id, shown in sf orders ls

CLI InstallationCopied!

To place an order on SF Compute, you'll need to sign up on the website and fund your account. If you'd like to talk to us before you do so, you can reach us at contact@sfcompute.com.

Download and install the command line tool.

curl -fsSL https://sfcompute.com/cli/install | bash

Login via the CLI.

sf login

Buying GPUsCopied!

You can use GPUs from SF Compute with Kubernetes or virtual machines. The CLI by default places buy orders for Kubernetes if you do not specify which type you want.

Placing buy ordersCopied!

Let's place an order for 1 day on 1024 H100s with InfiniBand (128 nodes), starting tomorrow at 10am, for $5 per GPU/hour.

sf buy -n 1024 -p '5' -s 'tomorrow at 10am' -d '1d'

$5 per GPU/hour isn't crazy for a last minute 1024 fully-interconnected cluster for only a day, but that's way higher than we want. Instead, let's set a max price. If someone offers our price or lower, we'll get the cluster, otherwise the order is canceled.

We'll set a low price, say $1.50 per GPU/hour, and see if we can get lucky. Maybe someone's code isn't ready yet, and they need to firesale their cluster to recoup costs.

sf buy -n 1024 -s 'tomorrow at 10am' -d '1d' -p '1.5'

You can check the status of your orders with sf orders list:

sf orders list

buy    $1.07/gpu/hr       1h20m   jan 31 12:40 pm → 2:00 pm            filled ordr_bwYX8o0C5u5o48f4rFf
buy    $1.05/gpu/hr$1.03  46m     feb 1 1:14 pm → 2:00 pm              filled ordr_bwYX8o0C5u7WGhtfIIx
buy    $0.43/gpu/hr$0.36  1h15m   feb 10 8:45 pm → 10:00 pm            filled ordr_bwYX8o0C5zrYvUIjuZh
buy    $1.06/gpu/hr$1.05  1h48m   feb 20 3:12 pm → 5:00 pm             filled ordr_bwYX8o0C5ztgrhY2HGd

Extending a contractCopied!

If you have a contract that’s already running, but you’d like to buy more time on it, you can use a colocation constraint.

First, run sf contracts ls

sf contracts ls

ACTIVE     cont_3ICsKjA

Type        h100i
Extend      sf extend --contract cont_3ICsKjA --duration 1h
Orders      16 gpus  │ 1pm → 7pm (6h) [Active]

Then run the extend command to add another hour or any duration you want

sf extend --contract cont_3ICsKjA --duration 1h

CLI optionsCopied!

Telemetry

The SF Compute CLI collects some usage data. This is enabled by default.

To opt out of telemetry, set the SF_CLI_TELEMETRY_OPTOUT environment variable to 1 or true.

Auto-upgrades

The CLI automatically upgrades if there’s a new patch version.

To opt out of auto-upgrades, set the SF_CLI_DISABLE_AUTO_UPGRADE environment variable to 1 or true.