Management of Docker images across other repositories
View the Project on GitHub python-helpers/docker-image-management
Table of contents generated with markdown-toc
infrahelpers/python-light
artificialintelligence/python-light
alp319-py311
infrahelpers/dpp
jdk17-python3.12
, jdk11-python3.12
, jdk8-python3.12
,
jdk17-python3.11
, jdk11-python3.11
, jdk8-python3.11
infrahelpers/cpppython
cpppythondevelopment/base
ubuntu2404
, ubuntu2204
, ubuntu2004
,
debian12
, debian11
, centos9
, centos8
, centos7
,
fedora40
, fedora39
infrahelpers/python-jupyter
artificialintelligence/python-jupyter
ubuntu2404
, ubuntu2204
, ubuntu2004
,
debian12
, debian11
, centos9
, centos8
infrahelpers/cloud-python
Image tags:
pyspark-emr6
, pyspark-emr6-light
, pyspark-emr-dbs
, pyspark-emr-jdk11
,
py312-bookworm
, py311-bookworm
, py310-bookworm
,
py39-bookworm
, py38-bookworm
Git repository: https://github.com/cpp-projects-showcase/docker-images
$ cat ubuntu2204/Dockerfile
...
# Python 3.12.3
RUN pyenv install 3.12.3 && \
pyenv global 3.12.3 && \
python -mpip install -U pip pipenv
RUN pyenv global system || echo "No default system version of Python. Sticking to 3.12.3"
...
The ML Python Jupyter Docker images are built on top of the generic C++/Python images, described in the section above. The Python versions are therefore controlled by those Docker images.
The Python virtual environment specifications need however to be upgraded. Files to update:
The default Python versions for light images (e.g., Alpine, Debian and Debian Slim), as maintained by Docker itself (on GitHub and on Docker Hub), are usually the latest Python stable versions, only a few days after they have been released. There is hence no need to upgrade the Python version on the light Docker images.
Reference: ML-related Python induction project
Note that this Git repository is also a sub-module of the Python Jupyter Docker image project
There are two folders in that project where the Python setup has to be updated:
ml_induction_python
folder
Pipfile
requirements.txt
requirements.txt
file may be upgraded with:
$ pipenv install
pipenv requirements > requirements.txt
git add requirements.txt
git commit -m "Upgreded the Python dependencies"
Then, the ML Docker project (see above) should be updated to point to the new Python ML induction head.
$ mkdir -p ~/dev/ml && git clone https://github.com/machine-learning-helpers/docker-python-jupyter ~/dev/ml/docker-python-jupyter
$ cd ~/dev/ml/docker-python-jupyter
$ git submodule init
$ git submodule update --recursive --force
master
branch on the ML induction module:
$ cd ~/dev/ml/docker-python-jupyter/notebook/induction
$ git checkout master
$ git pull
$ cd ~/dev/ml/docker-python-jupyter
$ git add notebook/induction
$ git commit -m "[Modules] Updated the Python ML induction module"
$ git push
References:
Files to update:
References:
Files to update:
Pipfile
requirements.txt
requirements.txt
file as
ci-scripts/requirements.txt
in OpenTravelData (OPTD)References:
Files to update:
Pipfile
Pipfile.lock
setup.py
pyproject.toml
requirements.txt
requirements-dev.txt
.travis.yml
tox.ini
Publish the component on PyPi:
user@laptop$ cd ~/dev/geo/python-opentraveldata
user@laptop$ rm -rf dist
user@laptop$ python -mbuild
user@laptop$ PYPIURL="https://test.pypi.org"
user@laptop$ twine upload -u __token__ --repository-url ${PYPIURL}/legacy/ dist/*
user@laptop$ PYPIURL="https://pypi.org"
user@laptop$ #keyring set ${PYPIURL}/ __token__
user@laptop$ twine upload -u __token__ --non-interactive dist/*
The result should available on PyPi, e.g., https://pypi.org/project/opentraveldata/0.0.9.post2/
References:
Files to update:
Publish the component on PyPi:
user@laptop$ rm -rf dist && mkdir dist
user@laptop$ python setup.py sdist bdist_wheel
user@laptop$ PYPIURL="https://test.pypi.org"
user@laptop$ twine upload -u __token__ --repository-url ${PYPIURL}/legacy/ dist/*
user@laptop$ PYPIURL="https://pypi.org"
user@laptop$ #keyring set ${PYPIURL}/ __token__
user@laptop$ twine upload -u __token__ --non-interactive dist/*
The resulting artifact should be available on PyPi, e.g.: https://pypi.org/project/OpenTrepWrapper/0.7.7.post3/
Pipfile
:
$ pipenv install; pipenv install --dev
$ pipenv update
psycopg2
module, there may be some trouble
at installation time related to an issue with SSL libraries. It can
usually be solved with:
$ LDFLAGS="-I/usr/local/opt/openssl/include" CPPFLAGS="-L/usr/local/opt/openssl/lib" pipenv install psycopg2
Installing psycopg2
Adding psycopg2 to Pipfile's [packages]
✔ Installation Succeeded
$ pipenv install; pipenv install --dev