Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /Aquiles-ai_Aquiles-Image /example /aquiles_deploy_ltx_2.py
| import modal | |
| aquiles_image = ( | |
| modal.Image.from_registry("nvidia/cuda:12.8.0-devel-ubuntu22.04", add_python="3.12") | |
| .apt_install("git", | |
| "curl", | |
| "build-essential", | |
| "wget", | |
| "libgl1", | |
| "libglib2.0-0", | |
| "ffmpeg", | |
| "libavcodec-dev", | |
| "libavformat-dev", | |
| "libavutil-dev", | |
| "libswscale-dev", | |
| "libavfilter-dev", | |
| "libavdevice-dev", ) | |
| .entrypoint([]) | |
| .run_commands( | |
| "python -m pip install --upgrade pip", | |
| "python -m pip install --upgrade setuptools wheel", | |
| ) | |
| .uv_pip_install( | |
| "torch==2.8", | |
| "git+https://github.com/huggingface/diffusers.git", | |
| "transformers==4.57.6", | |
| "tokenizers==0.22.2", | |
| "https://github.com/mjun0812/flash-attention-prebuild-wheels/releases/download/v0.3.14/flash_attn-2.8.2+cu128torch2.8-cp312-cp312-linux_x86_64.whl", | |
| "git+https://github.com/Aquiles-ai/Aquiles-Image.git", | |
| "bitsandbytes==0.49.0", | |
| "accelerate==1.12.0", | |
| "git+https://github.com/FredyRivera-dev/LTX-2.git#subdirectory=packages/ltx-core", | |
| "git+https://github.com/FredyRivera-dev/LTX-2.git#subdirectory=packages/ltx-pipelines", | |
| "av==16.0.1" | |
| ) | |
| .env({"HF_XET_HIGH_PERFORMANCE": "1", | |
| "PYTORCH_CUDA_ALLOC_CONF": "expandable_segments:True"}) | |
| ) | |
| MODEL_NAME = "ltx-2" | |
| 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) | |
| aquiles_video_vol = modal.Volume.from_name("aquiles-video-cache", create_if_missing=True) | |
| app = modal.App("aquiles-image-server-ltx-2") | |
| 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, | |
| "--api-key", "dummy-api-key", | |
| "--username", "root", | |
| "--password", "root", | |
| ] | |
| 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.66 kB
- Xet hash:
- fafbc288e5f3ab7804f3340acf8f9cea4e979483ce5aa3a3c2e1b9f19ca389ca
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.