|
| 1 | +# Sandbox base image |
| 2 | +FROM zenmldocker/zenml-sandbox:latest |
| 3 | + |
| 4 | +# Install uv from official distroless image |
| 5 | +COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/ |
| 6 | + |
| 7 | +# Set uv environment variables for optimization |
| 8 | +ENV UV_SYSTEM_PYTHON=1 |
| 9 | +ENV UV_COMPILE_BYTECODE=1 |
| 10 | + |
| 11 | +# Project metadata |
| 12 | +LABEL project_name="zencoder" |
| 13 | +LABEL project_version="0.1.0" |
| 14 | + |
| 15 | +# Install dependencies with uv and cache optimization |
| 16 | +RUN --mount=type=cache,target=/root/.cache/uv \ |
| 17 | + uv pip install --system \ |
| 18 | + "zenml[server]>=0.73.0" \ |
| 19 | + "packaging" \ |
| 20 | + "notebook" \ |
| 21 | + "datasets" \ |
| 22 | + "nbformat" \ |
| 23 | + "pandas" \ |
| 24 | + "PyGithub" \ |
| 25 | + "ninja" \ |
| 26 | + "kfp>=2.6.0" \ |
| 27 | + "gcsfs" \ |
| 28 | + "google-cloud-secret-manager" \ |
| 29 | + "google-cloud-container>=2.21.0" \ |
| 30 | + "google-cloud-artifact-registry>=1.11.3" \ |
| 31 | + "google-cloud-storage>=2.9.0" \ |
| 32 | + "google-cloud-aiplatform>=1.34.0" \ |
| 33 | + "google-cloud-build>=3.11.0" \ |
| 34 | + "kubernetes" \ |
| 35 | + "git+https://github.com/huggingface/transformers" \ |
| 36 | + "git+https://github.com/huggingface/accelerate" \ |
| 37 | + "git+https://github.com/huggingface/peft" \ |
| 38 | + "trl" \ |
| 39 | + "huggingface-hub" \ |
| 40 | + "bitsandbytes" \ |
| 41 | + "evaluate" \ |
| 42 | + "einops" \ |
| 43 | + "wandb>=0.12.12" \ |
| 44 | + "tiktoken" \ |
| 45 | + "deepspeed" \ |
| 46 | + "tqdm==4.65.0" \ |
| 47 | + "safetensors" |
| 48 | + |
| 49 | +# Set workspace directory |
| 50 | +WORKDIR /workspace |
| 51 | + |
| 52 | +# Clone only the project directory and reorganize |
| 53 | +RUN git clone --depth 1 https://github.com/zenml-io/zenml-projects.git /tmp/zenml-projects && \ |
| 54 | + cp -r /tmp/zenml-projects/zencoder/* /workspace/ && \ |
| 55 | + rm -rf /tmp/zenml-projects |
| 56 | + |
| 57 | +# VSCode settings |
| 58 | +RUN mkdir -p /workspace/.vscode && \ |
| 59 | + printf '{\n "workbench.colorTheme": "Default Dark Modern"\n}' > /workspace/.vscode/settings.json |
| 60 | + |
| 61 | + |
0 commit comments