Skip to content

Commit 99fa89f

Browse files
authored
Merge pull request #213 from zenml-io/auto-dockerfile-magic-photobooth
Auto-generate Dockerfile.codespace for magic-photobooth
2 parents 71e6c3b + 0994d56 commit 99fa89f

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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="magic-photobooth"
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+
"git+https://github.com/huggingface/[email protected]" \
19+
"datasets" \
20+
"ftfy~=6.1.0" \
21+
"transformers~=4.41.2" \
22+
"sentencepiece>=0.1.91,!=0.1.92" \
23+
"torch~=2.2.0" \
24+
"torchvision~=0.16" \
25+
"peft" \
26+
"smart_open" \
27+
"git+https://github.com/zenml-io/zenml.git@main" \
28+
"git+https://github.com/huggingface/[email protected]" \
29+
"pillow" \
30+
"tensorboard" \
31+
"Jinja2" \
32+
"bitsandbytes" \
33+
"opencv-python" \
34+
"imageio" \
35+
"imageio-ffmpeg"
36+
37+
# Set workspace directory
38+
WORKDIR /workspace
39+
40+
# Clone only the project directory and reorganize
41+
RUN git clone --depth 1 https://github.com/zenml-io/zenml-projects.git /tmp/zenml-projects && \
42+
cp -r /tmp/zenml-projects/magic-photobooth/* /workspace/ && \
43+
rm -rf /tmp/zenml-projects
44+
45+
# VSCode settings
46+
RUN mkdir -p /workspace/.vscode && \
47+
printf '{\n "workbench.colorTheme": "Default Dark Modern"\n}' > /workspace/.vscode/settings.json
48+
49+

0 commit comments

Comments
 (0)