Create a bucket and access key
Creating buckets or access keys requires a billing profile, primary billing contact, and card set as the default payment method. Have an organization admin complete this setup under Billing in the console. The examples useeurope-north1 and your active workspace.
Replace acme-training-data throughout with your own bucket name.
- CLI
- Console
Install Save the returned access key ID and secret in your secrets manager. The secret is returned
only once.
sf and log in, then create a bucket and key in
the same region.sf storage buckets get acme-training-data.
sf storage access-key create --format env and the console’s Access bucket snippets print
AWS_* names instead. Rename them as below so they don’t override your existing AWS credentials.
Restrictions
Usage and billing
SF Compute measures the bytes stored in each bucket hourly. Storage costs $0.14 per GiB-month, prorated by the amount of data stored and how long you keep it. For example, 100 GiB stored for a full calendar month costs $14; for half that month, $7. Usage is invoiced after each UTC calendar month. Your default card is charged when the invoice is due, seven days after it is sent. Storage charges are separate from prepaid compute credits. Track usage and month-to-date cost under Usage → Storage in the console. View invoices under Billing → Invoices.Bring your dataset to SFC
Run these commands on your laptop or the machine doing the transfer. Install rclone, then configure an SFC remote using the credentials loaded above.- From your laptop
- From another S3 provider
Copy your dataset into a versioned directory in the bucket.
copy to transfer new or changed files. Use a new directory such as datasets/v2 for a new
dataset version. To mirror the source exactly, use rclone sync; it also deletes destination files
absent from the source.
Use the dataset on an instance
Connect to your instance, set the variables above, and configure rclone as above. Copy the dataset onto its local disk before starting training.~/datasets/v1. Repeat on each instance that needs a local copy.
Save and resume training checkpoints
From an SFC instance, save checkpoints to object storage in the same region as your training job. This keeps them available when you move to another instance or start another run. With PyTorch already installed, runpython -m pip install boto3 in your training environment. Set
the same variables there. Add this to your training loop, where model, optimizer, and step are
your current training state:
Manage storage
List buckets and keys withsf storage buckets list and sf storage access-key list, or open
Storage in the console. Revoke a key with sf storage access-key delete training or Revoke
Key.
When you no longer need a bucket, run sf storage buckets delete acme-training-data or select
Delete Bucket in the console. Confirm the name when prompted. Deletion removes the bucket and
all its objects.
API reference
The SF Compute API doesn’t manage buckets or access keys yet. Usesf storage to script them, or
contact us if you need programmatic access.