Skip to content
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

[DO NOT MERGE] [WIP] RHOAIENG-9036: [Spike] Explore poetry over pipenv for the IDE notebook repo #590

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 0 additions & 2 deletions .github/workflows/code-quality.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ jobs:
ret_code=0
echo "-- Checking a regular '*.json' files"
for f in **/*.json; do echo "Checking: '${f}"; echo -n " > "; cat $f | json_verify || ret_code=1; done
echo "-- Checking a 'Pipfile.lock' files"
for f in **/Pipfile.lock; do echo "Checking: '${f}"; echo -n " > "; cat $f | json_verify || ret_code=1; done
echo "-- Checking a '*.ipynb' Jupyter notebook files"
for f in **/*.ipynb; do echo "Checking: '${f}"; echo -n " > "; cat $f | json_verify || ret_code=1; done
if test "${ret_code}" -ne 0; then
Expand Down
1 change: 1 addition & 0 deletions base/c9s-python-3.9/.python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.9
10 changes: 5 additions & 5 deletions base/c9s-python-3.9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ LABEL name="odh-notebook-base-centos-stream9-python-3.9" \

WORKDIR /opt/app-root/bin

# Install micropipenv to deploy packages from Pipfile.lock
RUN pip install --no-cache-dir -U "micropipenv[toml]"
# Install micropipenv to deploy packages from pyproject.toml and poetry.lock
RUN pip install --no-cache-dir -U "micropipenv[toml]==1.7.0"

# Install Python dependencies from Pipfile.lock file
COPY Pipfile.lock ./
# Install Python dependencies from pyproject.toml and poetry.lock file
COPY pyproject.toml poetry.lock ./

# OS Packages needs to be installed as root
USER root
Expand All @@ -27,7 +27,7 @@ RUN dnf install -y mesa-libGL && dnf clean all && rm -rf /var/cache/yum
# Other apps and tools installed as default user
USER 1001

RUN echo "Installing softwares and packages" && micropipenv install && rm -f ./Pipfile.lock && \
RUN echo "Installing softwares and packages" && micropipenv install --method poetry && rm -f ./pyproject.toml ./poetry.lock && \
# Install the oc client \
curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \
-o /tmp/openshift-client-linux.tar.gz && \
Expand Down
14 changes: 0 additions & 14 deletions base/c9s-python-3.9/Pipfile

This file was deleted.

29 changes: 0 additions & 29 deletions base/c9s-python-3.9/Pipfile.lock

This file was deleted.

36 changes: 36 additions & 0 deletions base/c9s-python-3.9/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions base/c9s-python-3.9/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[tool.poetry]
package-mode = false

[tool.poetry.dependencies]
python = ">=3.9.0,<3.10.0"
wheel = "~=0.43.0"
setuptools = "~=69.2.0"


[tool.poetry.group.dev.dependencies]

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

1 change: 1 addition & 0 deletions base/ubi8-python-3.8/.python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.8
10 changes: 5 additions & 5 deletions base/ubi8-python-3.8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ LABEL name="odh-notebook-base-ubi8-python-3.8" \

WORKDIR /opt/app-root/bin

# Install micropipenv to deploy packages from Pipfile.lock
RUN pip install --no-cache-dir -U "micropipenv[toml]"
# Install micropipenv to deploy packages from pyproject.toml and poetry.lock
RUN pip install --no-cache-dir -U "micropipenv[toml]==1.7.0"

# Install Python dependencies from Pipfile.lock file
COPY Pipfile.lock ./
# Install Python dependencies from pyproject.toml and poetry.lock file
COPY pyproject.toml poetry.lock ./

RUN echo "Installing softwares and packages" && micropipenv install && rm -f ./Pipfile.lock
RUN echo "Installing softwares and packages" && micropipenv install --method poetry && rm -f ./pyproject.toml ./poetry.lock

# OS Packages needs to be installed as root
USER root
Expand Down
14 changes: 0 additions & 14 deletions base/ubi8-python-3.8/Pipfile

This file was deleted.

29 changes: 0 additions & 29 deletions base/ubi8-python-3.8/Pipfile.lock

This file was deleted.

36 changes: 36 additions & 0 deletions base/ubi8-python-3.8/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions base/ubi8-python-3.8/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[tool.poetry]
package-mode = false

[tool.poetry.dependencies]
python = ">=3.8.1,<3.9.0"
wheel = "~=0.43.0"
setuptools = "~=69.2.0"


[tool.poetry.group.dev.dependencies]

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

1 change: 1 addition & 0 deletions base/ubi9-python-3.9/.python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.9
10 changes: 5 additions & 5 deletions base/ubi9-python-3.9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ LABEL name="odh-notebook-base-ubi9-python-3.9" \

WORKDIR /opt/app-root/bin

# Install micropipenv to deploy packages from Pipfile.lock
RUN pip install --no-cache-dir -U "micropipenv[toml]"
# Install micropipenv to deploy packages from pyproject.toml and poetry.lock
RUN pip install --no-cache-dir -U "micropipenv[toml]==1.7.0"

# Install Python dependencies from Pipfile.lock file
COPY Pipfile.lock ./
# Install Python dependencies from pyproject.toml and poetry.lock file
COPY pyproject.toml poetry.lock ./

RUN echo "Installing softwares and packages" && micropipenv install && rm -f ./Pipfile.lock
RUN echo "Installing softwares and packages" && micropipenv install --method poetry && rm -f ./pyproject.toml ./poetry.lock

# OS Packages needs to be installed as root
USER root
Expand Down
14 changes: 0 additions & 14 deletions base/ubi9-python-3.9/Pipfile

This file was deleted.

29 changes: 0 additions & 29 deletions base/ubi9-python-3.9/Pipfile.lock

This file was deleted.

36 changes: 36 additions & 0 deletions base/ubi9-python-3.9/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions base/ubi9-python-3.9/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[tool.poetry]
package-mode = false

[tool.poetry.dependencies]
python = ">=3.9.0,<3.10.0"
wheel = "~=0.43.0"
setuptools = "~=69.2.0"


[tool.poetry.group.dev.dependencies]

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

1 change: 1 addition & 0 deletions codeserver/ubi9-python-3.9/.python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.9
8 changes: 4 additions & 4 deletions codeserver/ubi9-python-3.9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ USER 0

WORKDIR /opt/app-root/bin

# Install usefull packages from Pipfile.lock
COPY Pipfile.lock ./
# Install usefull packages from pyproject.toml and poetry.lock
COPY pyproject.toml poetry.lock ./

# Install packages and cleanup
RUN echo "Installing softwares and packages" && \
micropipenv install && \
rm -f ./Pipfile.lock && \
micropipenv install --method poetry && \
rm -f ./pyproject.toml ./poetry.lock && \
# Fix permissions to support pip in Openshift environments \
chmod -R g+w /opt/app-root/lib/python3.9/site-packages && \
fix-permissions /opt/app-root -P
Expand Down
Loading
Loading