Skip to content

Commit 5feb688

Browse files
authored
Merge pull request #7 from OpenTechIL/develop
Develop
2 parents 8104b3f + 0b87823 commit 5feb688

8 files changed

Lines changed: 221 additions & 66 deletions

File tree

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,5 +77,5 @@ The project adheres to the `git-flow` branching model:
7777
### 2.4. General Project Conventions
7878

7979
* **Documentation**: Ensure `README.md` and `CONTRIBUTORS.md` are kept up-to-date.
80-
* **Dependency Management**: Python dependencies are managed via `requirements.txt`. Any additions should be made there and trigger a Docker image rebuild.
80+
* **Dependency Management**: Python dependencies are managed via runtime image wheelhouse. Core packages are provided by the base runtime image (`ghcr.io/opentechil/offline-python-runtime-docker:v1.1.0-release.0`), while additional packages can be installed at runtime or via project-specific `requirements.txt` for persistent installations.
8181
* **Offline Focus**: All configurations and scripts should prioritize and support the offline/air-gapped nature of the development environment.

CHANGELOG.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# 📝 Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [1.1.1] - 2026-01-07
9+
10+
### 🚀 Updates
11+
- **Runtime Image Update**: Updated to `ghcr.io/opentechil/offline-python-runtime-docker:v1.1.0-release.0`
12+
- **Documentation Enhancement**: Added clear guidance on offline package management process
13+
- **Repository Links**: Added direct links to runtime image repository for package requests
14+
15+
### 📦 Package Management
16+
- **Offline Package Process**: Documented process for adding packages to offline environments via runtime image
17+
- **Repository Integration**: Enhanced documentation linking to [runtime image repository](https://github.com/OpenTechIL/offline-python-runtime-docker)
18+
19+
---
20+
21+
## [1.1.0] - 2026-01-07
22+
23+
### 🚀 Major Changes
24+
- **Runtime Image Integration**: Now uses `ghcr.io/opentechil/offline-python-runtime-docker:v1.0.0-release.0` as base image
25+
- **Runtime Package Management**: Wheelhouse and package management moved to runtime for better compatibility
26+
27+
### ✨ New Features
28+
- **Oracle Driver Support**: Leverages Oracle Instant Client from runtime image
29+
- **Runtime Wheelhouse**: Package installation handled at runtime through pre-configured wheelhouse system
30+
- **Simplified Architecture**: Removed local `requirements.txt` dependencies, now managed by runtime image
31+
32+
### 🔄 Changes
33+
- **Package Management**: Core packages (pandas, oracledb, cryptography, etc.) now provided by runtime image
34+
- **Build Process**: Streamlined build process leveraging runtime image foundation
35+
- **Compatibility**: Enhanced offline compatibility through runtime wheelhouse system
36+
- **Runtime Repository**: Integration with [offline-python-runtime-docker](https://github.com/OpenTechIL/offline-python-runtime-docker) repository
37+
38+
### 📦 Package Updates
39+
- Core Python packages now sourced from runtime image
40+
- Oracle Instant Client 19.29 included via runtime image
41+
- Data science stack (pandas, numpy, scikit-learn) available from runtime
42+
43+
### 🏗️ Architecture
44+
- **Multi-stage build**: Runtime image as foundation with devcontainer customization
45+
- **Optimized layers**: Better Docker layer caching and reduced build times
46+
- **Runtime flexibility**: Package installation available both at build time and runtime
47+
48+
### 📚 Documentation
49+
- Updated README.md to reflect runtime image usage
50+
- Added runtime architecture explanations
51+
- Updated configuration examples for runtime package management
52+
53+
---
54+
55+
## [1.0.x] - Previous Versions
56+
57+
### 🐛 Known Issues
58+
- Package management complexity with local wheelhouse
59+
- Build image size optimization needed
60+
- Oracle driver compatibility issues in some environments
61+
62+
---
63+
64+
## Migration Guide
65+
66+
### From v1.0.x to v1.1.0
67+
68+
**Breaking Changes**:
69+
- Local `requirements.txt` packages are no longer built into the image
70+
- Package management now happens at runtime
71+
72+
**Recommended Actions**:
73+
1. Update your development workflow to install packages at runtime:
74+
```bash
75+
# Inside devcontainer
76+
pip install your-package
77+
```
78+
79+
2. For persistent packages, create project-specific `requirements.txt` and install when container starts
80+
81+
3. Update build scripts to use the new runtime image base
82+
83+
**Benefits**:
84+
- Faster build times
85+
- Better package compatibility
86+
- Simplified maintenance
87+
- Access to runtime wheelhouse with pre-compiled packages
88+
89+
---
90+
91+
## Version Support
92+
93+
| Version | Status | Support End |
94+
|---------|--------|-------------|
95+
| 1.1.x | ✅ Current | TBD |
96+
| 1.0.x | ⚠️ Legacy | 2026-03-07 |
97+
98+
---
99+
100+
*For detailed release notes and migration guides, check the [GitHub Releases](https://github.com/OpenTechIL/offline-python-vscode-devcontainer/releases) page.*

Dockerfile

Lines changed: 46 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,68 @@
1-
####### W: 3.0.3-3.13-trixie
2-
FROM mcr.microsoft.com/devcontainers/python:3.13-trixie AS builder
3-
WORKDIR /tmp/build
4-
COPY requirements.txt .
1+
#
2+
# Builder image for runtime
3+
# The wheelhouse located there:
4+
# https://github.com/OpenTechIL/offline-python-runtime-docker
5+
#
6+
# Update exact release. not "latests" etc to be consistent
7+
FROM ghcr.io/opentechil/offline-python-runtime-docker:v1.1.0-release.0 AS builder
58

6-
ENV PIP_ROOT_USER_ACTION=ignore
79

8-
RUN python -m pip install --no-cache-dir --upgrade pip
9-
RUN pip install --no-cache-dir \
10-
--target=/install -r requirements.txt
11-
12-
13-
#######
10+
#
11+
# Actual docker for
12+
#
1413
FROM mcr.microsoft.com/devcontainers/python:3.13-trixie
1514

16-
COPY --from=builder /install /usr/local/lib/python3.13/site-packages
17-
15+
##
16+
## ORACLE
17+
##
1818
RUN apt-get update && apt-get install -y libaio1t64 libaio-dev unzip curl python3-venv && rm -rf /var/lib/apt/lists/*
1919

20-
WORKDIR /opt/oracle
21-
22-
RUN curl -o instantclient-basic.zip https://download.oracle.com/otn_software/linux/instantclient/1929000/instantclient-basic-linux.x64-19.29.0.0.0dbru.zip && \
23-
unzip -o instantclient-basic.zip && \
24-
rm instantclient-basic.zip
25-
26-
RUN ln -s /usr/lib/x86_64-linux-gnu/libaio.so.1t64 /usr/lib/x86_64-linux-gnu/libaio.so.1
20+
COPY --from=builder /opt/oracle/instantclient_19_29 \
21+
/opt/oracle/instantclient_19_29
2722

2823
ENV LD_LIBRARY_PATH=/opt/oracle/instantclient_19_29:$LD_LIBRARY_PATH
2924
ENV ORACLE_HOME=/opt/oracle/instantclient_19_29
3025
ENV ORACLE_INSTANTCLIENT_PATH=/opt/oracle/instantclient_19_29
3126

27+
RUN ln -s /usr/lib/x86_64-linux-gnu/libaio.so.1t64 /usr/lib/x86_64-linux-gnu/libaio.so.1
28+
29+
30+
31+
##
32+
## PYTHON and wheelhouse
33+
##
34+
COPY --from=builder /lib/python_wheelhouse \
35+
/lib/python_wheelhouse
36+
37+
COPY --from=builder /usr/local/lib/python3.13/site-packages \
38+
/usr/local/lib/python3.13/site-packages
39+
40+
COPY --from=builder /etc/pip.conf \
41+
/etc/pip.conf
42+
43+
# python testing
3244
COPY --chown=vscode:vscode ./py-apps/ /home/vscode/py-apps/
33-
RUN su vscode -c "pytest -v /home/vscode/py-apps/tests/"
45+
RUN su vscode -c "cd /home/vscode/py-apps/ && \
46+
chmod +x ./run-tests.sh && \
47+
./run-tests.sh"
48+
3449

50+
##
51+
## VS Code configurations
52+
##
3553
# Ensure VS Code server directories exist with correct permissions
3654
RUN mkdir -p /home/vscode/.vscode-server/extensions && \
3755
mkdir -p /home/vscode/.vscode-server/data && \
3856
chown -R vscode:vscode /home/vscode/.vscode-server
3957

40-
58+
59+
##
60+
## Cleanups
61+
##
4162
# Clean up temporary extension files but keep installed extensions
42-
RUN rm -rf /tmp/extensions && \
43-
apt-get clean && \
44-
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
63+
RUN apt-get clean && \
64+
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
65+
rm -rf /tmp/extensions
4566

4667

4768
# Set a reasonable workdir for VS Code

README.md

Lines changed: 47 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
- [💻 Usage](#-usage)
2020
- [⚙️ Configuration](#️-configuration)
2121
- [🔒 Security](#-security)
22+
- [📝 Changelog](#-changelog)
2223
- [🐛 Troubleshooting](#-bug-troubleshooting)
2324
- [🤝 Contributing](#-contributing)
2425
- [📄 License](#-license)
@@ -27,11 +28,12 @@
2728

2829
- 🌐 **Offline-First**: Complete air-gapped development environment
2930
- 🐳 **Container-Based**: Isolated development with Podman/Docker support
30-
- 🐍 **Python 3.13**: Latest Python version with pre-installed packages
31-
- 🗄️ **Oracle Database**: Built-in Oracle Instant Client support
31+
- 🐍 **Python 3.13**: Latest Python version with runtime image foundation
32+
- 🗄️ **Oracle Database**: Built-in Oracle Instant Client from runtime image
3233
- 📝 **VSCode Integration**: Seamless development experience
3334
- 🧪 **Testing Ready**: Pre-configured pytest environment
34-
- 📦 **Pre-installed Packages**: pandas, cryptography, oracledb, pytest, ipykernel
35+
- 🏗️ **Runtime Image Base**: Built on `ghcr.io/opentechil/offline-python-runtime-docker:v1.1.0-release.0`
36+
- 📦 **Runtime Wheelhouse**: Package management handled at runtime for compatibility
3537
- 🔧 **Customizable**: Easy to extend with additional packages
3638
- 🛡️ **Security-Focused**: Non-root user execution
3739

@@ -161,6 +163,7 @@ import oracledb
161163
print("🐍 Python environment ready!")
162164
print(f"📊 Pandas version: {pd.__version__}")
163165
print(f"🗄️ Oracle DB available: {oracledb.__version__}")
166+
print(f"🏗️ Runtime image foundation active")
164167
EOF
165168

166169
# Run with mounted volume
@@ -187,23 +190,49 @@ podman run \
187190

188191
## ⚙️ Configuration
189192

193+
### Runtime Image Architecture
194+
This devcontainer is built on top of the offline Python runtime image which provides:
195+
- **Oracle Instant Client**: Full database connectivity support
196+
- **Core Packages**: Essential Python packages pre-installed
197+
- **Runtime Wheelhouse**: Package management handled at runtime for compatibility
198+
199+
**📦 Runtime Image Repository**: [github.com/OpenTechIL/offline-python-runtime-docker](https://github.com/OpenTechIL/offline-python-runtime-docker) - The base runtime image provides the core Python environment, Oracle drivers, and offline package management capabilities.
200+
190201
### Adding Python Packages
191-
1. Edit `requirements.txt`:
202+
Since v1.1.0, package management is handled at runtime through the wheelhouse system:
203+
204+
1. **For container runtime**: Install packages directly in the running container:
205+
```bash
206+
# Inside the devcontainer
207+
pip install numpy matplotlib seaborn
208+
```
209+
210+
2. **For persistent packages**: Add to your project's `requirements.txt`:
192211
```
193-
pandas
194-
cryptography
195-
oracledb
196-
pytest
197-
ipykernel
198-
# Add your packages here
199212
numpy
200213
matplotlib
214+
seaborn
215+
# Your application-specific packages
201216
```
202217

203-
2. Rebuild the image:
204-
```bash
205-
podman build . -t offline-python-vscode-devcontainer:dev-latest-local
206-
```
218+
3. **Runtime wheelhouse access**: All packages are installed from the pre-configured wheelhouse for offline compatibility.
219+
220+
Note: Core packages (pandas, cryptography, oracledb, pytest, ipykernel) are provided by the base runtime image and available immediately.
221+
222+
### 📦 Adding Packages to Offline Environment
223+
224+
**⚠️ Important**: For packages to be available in offline environments, they must be added to the **runtime image** itself:
225+
226+
- **Runtime Image Repository**: [github.com/OpenTechIL/offline-python-runtime-docker](https://github.com/OpenTechIL/offline-python-runtime-docker)
227+
- **How to Add**: Submit a PR or issue to the runtime image repository with your package requirements
228+
- **Why**: The runtime image contains the pre-built wheelhouse that enables offline package installation
229+
230+
**Process for Adding New Offline Packages**:
231+
1. Check if the package already exists in the runtime image
232+
2. If not, open an issue or PR in the [runtime image repository](https://github.com/OpenTechIL/offline-python-runtime-docker)
233+
3. Once included in a new runtime release, update this devcontainer to use the new version
234+
235+
This ensures your packages are available for true offline deployment without requiring network access.
207236

208237
### Custom VSCode Extensions
209238
Update `.devcontainer/devcontainer.json`:
@@ -250,6 +279,10 @@ podman run -v ./project:/home/vscode/project:Z \
250279
- 🔒 **No network access**: Container runs in isolation
251280
- 📋 **Minimal attack surface**: Only essential packages installed
252281

282+
## 📝 Changelog
283+
284+
See [CHANGELOG.md](CHANGELOG.md) for detailed version history and feature updates.
285+
253286
## 🐛 Troubleshooting
254287

255288
### Common Issues
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Data: 07.01.2026
2+
3+
Will use `ghcr.io/opentechil/offline-python-runtime-docker:v1.0.0-release.0`
4+
as build image to take the packages, and oracle driver
5+
6+
Removed `requirements.txt` all packages and wheelhouse will be managed at runtime for compatibility
7+
in https://github.com/OpenTechIL/offline-python-runtime-docker
8+

py-apps/requirements.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# The disterbutions should be exists as whl
2+
# from runner docker in Wheelhouse:
3+
# https://github.com/OpenTechIL/offline-python-runtime-docker
4+
#
5+
oracledb
6+
pytest

py-apps/run-tests.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
python3 -m venv .venv
6+
source .venv/bin/activate
7+
pip install -r requirements.txt
8+
9+
pytest -v /home/vscode/py-apps/tests/
10+
11+
.venv/bin/deativate
12+
13+
rm -rf .venv

requirements.txt

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)