Sandbox configuration for ML development with PyTorch, TensorFlow, or JAX.
cd your-ml-project
cp /path/to/watermelon/docs/examples/python-ml/.watermelon.toml ./
watermelon runpython -m venv venv
source venv/bin/activate
pip install torch transformers jupyter
jupyter notebook --ip=0.0.0.0 --port=8888
# Visit http://localhost:8888 on your hostML workloads need more resources. Adjust based on your host capacity:
[resources]
memory = "32GB" # For larger models
cpus = 8
disk = "100GB" # For datasetsThe example allowlist includes Hugging Face Hub. Add only the other model sources your project needs:
[network]
allow = [
"pypi.org",
"files.pythonhosted.org",
"huggingface.co",
"*.huggingface.co",
"download.pytorch.org", # PyTorch model zoo
"storage.googleapis.com", # TensorFlow Hub
]GPU passthrough requires additional Lima configuration. See Lima documentation for GPU setup.