Skip to content

Auto-generate Dockerfile.codespace for credit-scorer #224

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions credit-scorer/Dockerfile.codespace
Original file line number Diff line number Diff line change
@@ -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="credit-scorer"
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 \
"cyclonedx-python-lib>=10.0.1" \
"fairlearn>=0.12.0" \
"lightgbm>=4.6.0" \
"markdown>=3.8" \
"matplotlib>=3.10.3" \
"modal>=0.74.55" \
"openpyxl>=3.1.5" \
"pandas>=2.2.3" \
"plotly>=6.0.1" \
"scikit-learn>=1.6.1" \
"seaborn>=0.13.2" \
"slack-sdk>=3.35.0" \
"streamlit>=1.45.1" \
"streamlit-option-menu>=0.4.0" \
"tabulate>=0.9.0" \
"weasyprint>=65.1" \
"xlsxwriter>=3.2.3" \
"zenml>=0.82.1"

# 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/credit-scorer/* /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