Skip to content

Commit bfd8c23

Browse files
author
marwan37
committed
use complete env variable key in template
1 parent 398c4e4 commit bfd8c23

File tree

3 files changed

+27
-27
lines changed

3 files changed

+27
-27
lines changed

omni-reader/Dockerfile.sandbox

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,47 @@
11
# Sandbox base image
2-
FROM safoinext/zenml-sandbox:latest
2+
FROM zenmldocker/zenml-sandbox:latest
3+
4+
# Project metadata
5+
LABEL project_name="omni-reader"
6+
LABEL project_version="0.1.0"
37

48
# Install project-specific dependencies
5-
# Install polars-lts-cpu instead of polars (version compiled for CPU compatibility)
69
RUN pip install --no-cache-dir \
7-
"instructor==1.7.7" \
8-
"jiwer==3.0.5" \
9-
"jiter==0.8.2" \
10+
"instructor" \
11+
"jiwer" \
12+
"jiter" \
1013
"importlib-metadata<7.0,>=1.4.0" \
11-
"litellm==1.64.1" \
14+
"litellm" \
1215
"mistralai==1.0.3" \
1316
"numpy<2.0,>=1.9.0" \
1417
"openai==1.69.0" \
1518
"Pillow==11.1.0" \
1619
"polars-lts-cpu==1.26.0" \
1720
"pyarrow>=7.0.0" \
18-
"python-dotenv==1.0.1" \
21+
"python-dotenv" \
1922
"streamlit==1.44.0" \
2023
"pydantic>=2.8.2,<2.9.0" \
2124
"tqdm==4.66.4" \
22-
"zenml>=0.80.0" \
23-
uv
25+
"zenml>=0.80.0"
2426

2527
# Set workspace directory
2628
WORKDIR /workspace
2729

28-
# Clone only the omni-reader directory and reorganize
30+
# Clone only the project directory and reorganize
2931
RUN git clone --depth 1 https://github.com/zenml-io/zenml-projects.git /tmp/zenml-projects && \
3032
cp -r /tmp/zenml-projects/omni-reader/* /workspace/ && \
3133
rm -rf /tmp/zenml-projects
3234

3335
# Create a template .env file for API keys
34-
RUN echo "OPENAI_API_KEY=YOUR_OPENAI_API_KEY_HERE" > .env && \
35-
echo "MISTRAL_API_KEY=YOUR_MISTRAL_API_KEY_HERE" >> .env
36+
RUN echo "OPENAI_API_KEY=YOUR_OPENAI_API_KEY" && \
37+
echo "MISTRAL_API_KEY=YOUR_MISTRAL_API_KEY" > .env
3638

37-
# Create a .vscode directory (mainly to auto-apply the dark theme)
38-
RUN mkdir -p /workspace/.vscode
39-
# Copy settings file
40-
COPY settings.json /workspace/.vscode/settings.json
39+
# Create a .vscode directory and settings.json file
40+
RUN mkdir -p /workspace/.vscode && \
41+
echo '{\n'\
42+
' "workbench.colorTheme": "Default Dark Modern"\n'\
43+
'}' > /workspace/.vscode/settings.json
4144

42-
# Set environment variable to skip CPU checks for Polars as a fallback
43-
ENV POLARS_SKIP_CPU_CHECK=1
4445

46+
# Set environment variables for compatibility and performance
47+
ENV POLARS_SKIP_CPU_CHECK=1

oncoclear/Dockerfile.sandbox

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Sandbox base image
2-
FROM safoinext/zenml-sandbox:latest
2+
FROM zenmldocker/zenml-sandbox:latest
33

44
# Project metadata
55
LABEL project_name="oncoclear"
@@ -22,9 +22,9 @@ RUN git clone --depth 1 https://github.com/zenml-io/zenml-projects.git /tmp/zenm
2222
rm -rf /tmp/zenml-projects
2323

2424
# Create a template .env file for API keys
25-
RUN echo "ZENML_PROJECT_SECRET_NAME=YOUR_ZENML_KEY_HERE" && \
26-
echo "ZENML_STORE_URL=YOUR_ZENML_KEY_HERE" && \
27-
echo "ZENML_STORE_API_KEY=YOUR_ZENML_KEY_HERE" > .env
25+
RUN echo "ZENML_PROJECT_SECRET_NAME=YOUR_ZENML_PROJECT_SECRET_NAME" && \
26+
echo "ZENML_STORE_URL=YOUR_ZENML_STORE_URL" && \
27+
echo "ZENML_STORE_API_KEY=YOUR_ZENML_STORE_API_KEY" > .env
2828

2929
# Create a .vscode directory and settings.json file
3030
RUN mkdir -p /workspace/.vscode && \

scripts/generate_sandbox_dockerfile.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,11 @@
4545

4646
def format_env_key(key):
4747
"""Format environment variable placeholder text."""
48-
# Extract the service name from the key
49-
service = key.split("_")[0] if "_" in key else key
5048
# Special case handling
5149
if key == "GOOGLE_APPLICATION_CREDENTIALS":
5250
return f"{key}=PATH_TO_YOUR_GOOGLE_CREDENTIALS_FILE"
53-
if key == "HF_TOKEN":
54-
return f"{key}=YOUR_HUGGINGFACE_TOKEN_HERE"
55-
return f"{key}=YOUR_{service}_KEY_HERE"
51+
52+
return f"{key}=YOUR_{key}"
5653

5754

5855
def parse_requirements(project_dir):

0 commit comments

Comments
 (0)