Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /Aquiles-ai_Aquiles-Image /example /aquiles_deploy.py
| import modal | |
| import os | |
| aquiles_image = ( | |
| modal.Image.from_registry("nvidia/cuda:13.0.0-devel-ubuntu22.04", add_python="3.12") | |
| .apt_install("git", "curl", "build-essential",) | |
| .entrypoint([]) | |
| .run_commands( | |
| "python -m pip install --upgrade pip", | |
| "python -m pip install --upgrade setuptools wheel" | |
| ) | |
| .uv_pip_install( | |
| "torch==2.11", | |
| "git+https://github.com/huggingface/diffusers.git", | |
| "transformers==5.14.1", | |
| "git+https://github.com/Aquiles-ai/Aquiles-Image.git", | |
| "https://github.com/mjun0812/flash-attention-prebuild-wheels/releases/download/v0.9.4/flash_attn-2.8.3+cu130torch2.11-cp312-cp312-linux_x86_64.whl", | |
| "kernels", | |
| "rich" | |
| ) | |
| .env({"HF_XET_HIGH_PERFORMANCE": "1"}) | |
| ) | |
| MODEL_NAME = "stabilityai/stable-diffusion-3.5-medium" | |
| hf_cache_vol = modal.Volume.from_name("huggingface-cache", create_if_missing=True) | |
| aquiles_config_vol = modal.Volume.from_name("aquiles-cache", create_if_missing=True) | |
| app = modal.App("aquiles-image-server") | |
| N_GPU = 1 | |
| MINUTES = 60 | |
| AQUILES_PORT = 5500 | |
| def serve(): | |
| import subprocess | |
| cmd = [ | |
| "aquiles-image", | |
| "serve", | |
| "--host", | |
| "0.0.0.0", | |
| "--port", | |
| str(AQUILES_PORT), | |
| "--model", | |
| MODEL_NAME, | |
| "--set-steps", "30", | |
| "--api-key", "dummy-api-key", | |
| "--max-batch-size", "10", | |
| "--batch-timeout", "1.0" | |
| ] | |
| print(f"Starting Aquiles-Image with the model:{MODEL_NAME}") | |
| print(f"Command {' '.join(cmd)}") | |
| subprocess.Popen(" ".join(cmd), shell=True) |
Xet Storage Details
- Size:
- 2 kB
- Xet hash:
- 865237f3e59baa4abc1cfeb1cb5ed6c52a0aefa51f61911a32655f072dc69970
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.