stevenbucaille's picture
Enhance image processing capabilities and update project structure
111afa2
raw
history blame
792 Bytes
import modal
cuda_version = "12.4.0" # should be no greater than host CUDA version
flavor = "devel" # includes full CUDA toolkit
operating_sys = "ubuntu22.04"
tag = f"{cuda_version}-{flavor}-{operating_sys}"
cuda_dev_image = modal.Image.from_registry(f"nvidia/cuda:{tag}", add_python="3.10")
image = (
cuda_dev_image.apt_install(
"git",
"libglib2.0-0",
"libsm6",
"libxrender1",
"libxext6",
"ffmpeg",
"libgl1",
)
.add_local_file("requirements.txt", "/app_requirements.txt", copy=True)
.run_commands(
[
"cat /app_requirements.txt",
"uv pip install --system --requirement /app_requirements.txt",
]
)
.env({"HF_HUB_ENABLE_HF_TRANSFER": "1", "HF_HUB_CACHE": "/cache"})
)