Skip to content

Commit 2896f84

Browse files
authored
Merge pull request #190 from zenml-io/sandbox/add-dockerfile-for-omni-reader
Add Dockerfile for running OmniReader in sandbox environment
2 parents 4d7074d + 46b15c8 commit 2896f84

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed

omni-reader/Dockerfile.sandbox

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Sandbox base image
2+
FROM safoinext/zenml-sandbox:latest
3+
4+
# Install project-specific dependencies
5+
# Install polars-lts-cpu instead of polars (version compiled for CPU compatibility)
6+
RUN pip install --no-cache-dir \
7+
"instructor==1.7.7" \
8+
"jiwer==3.0.5" \
9+
"jiter==0.8.2" \
10+
"importlib-metadata<7.0,>=1.4.0" \
11+
"litellm==1.64.1" \
12+
"mistralai==1.0.3" \
13+
"numpy<2.0,>=1.9.0" \
14+
"openai==1.69.0" \
15+
"Pillow==11.1.0" \
16+
"polars-lts-cpu==1.26.0" \
17+
"pyarrow>=7.0.0" \
18+
"python-dotenv==1.0.1" \
19+
"streamlit==1.44.0" \
20+
"pydantic>=2.8.2,<2.9.0" \
21+
"tqdm==4.66.4" \
22+
"zenml>=0.80.0" \
23+
uv
24+
25+
# Set workspace directory
26+
WORKDIR /workspace
27+
28+
# Clone only the omni-reader directory and reorganize
29+
RUN git clone --depth 1 https://github.com/zenml-io/zenml-projects.git /tmp/zenml-projects && \
30+
cp -r /tmp/zenml-projects/omni-reader/* /workspace/ && \
31+
rm -rf /tmp/zenml-projects
32+
33+
# 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+
37+
# Create a settings directory (mainly to auto-apply the dark theme)
38+
RUN mkdir -p /root/.local/share/code-server/User
39+
# Copy settings file
40+
COPY settings.json /root/.local/share/code-server/User/
41+
42+
# Set environment variable to skip CPU checks for Polars as a fallback
43+
ENV POLARS_SKIP_CPU_CHECK=1
44+

omni-reader/settings.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"editor.formatOnSave": true,
3+
"python.defaultInterpreterPath": "/opt/venv/bin/python",
4+
"python.analysis.extraPaths": ["/workspace"],
5+
"workbench.startupEditor": "none",
6+
"terminal.integrated.defaultProfile.linux": "bash",
7+
"workbench.colorTheme": "Dark Modern",
8+
"python.linting.enabled": true,
9+
"python.linting.pylintEnabled": true,
10+
"files.exclude": {
11+
"**/__pycache__": true,
12+
"**/.pytest_cache": true
13+
}
14+
}

0 commit comments

Comments
 (0)