diff --git a/magic-photobooth/Dockerfile.codespace b/magic-photobooth/Dockerfile.codespace new file mode 100644 index 00000000..90461762 --- /dev/null +++ b/magic-photobooth/Dockerfile.codespace @@ -0,0 +1,49 @@ +# Sandbox base image +FROM zenmldocker/zenml-sandbox:latest + +# Install uv from official distroless image +COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/ + +# Set uv environment variables for optimization +ENV UV_SYSTEM_PYTHON=1 +ENV UV_COMPILE_BYTECODE=1 + +# Project metadata +LABEL project_name="magic-photobooth" +LABEL project_version="0.1.0" + +# Install dependencies with uv and cache optimization +RUN --mount=type=cache,target=/root/.cache/uv \ + uv pip install --system \ + "git+https://github.com/huggingface/accelerate.git@v0.33.0" \ + "datasets" \ + "ftfy~=6.1.0" \ + "transformers~=4.41.2" \ + "sentencepiece>=0.1.91,!=0.1.92" \ + "torch~=2.2.0" \ + "torchvision~=0.16" \ + "peft" \ + "smart_open" \ + "git+https://github.com/zenml-io/zenml.git@main" \ + "git+https://github.com/huggingface/diffusers.git@v0.30.2" \ + "pillow" \ + "tensorboard" \ + "Jinja2" \ + "bitsandbytes" \ + "opencv-python" \ + "imageio" \ + "imageio-ffmpeg" + +# Set workspace directory +WORKDIR /workspace + +# Clone only the project directory and reorganize +RUN git clone --depth 1 https://github.com/zenml-io/zenml-projects.git /tmp/zenml-projects && \ + cp -r /tmp/zenml-projects/magic-photobooth/* /workspace/ && \ + rm -rf /tmp/zenml-projects + +# VSCode settings +RUN mkdir -p /workspace/.vscode && \ + printf '{\n "workbench.colorTheme": "Default Dark Modern"\n}' > /workspace/.vscode/settings.json + +