Skip to content
Merged
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: 1 addition & 1 deletion .github/workflows/github-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python: ["3.8"]
python: ["3.9"]
os: [ubuntu-22.04]
node: [10]
fail-fast: false
Expand Down
4 changes: 3 additions & 1 deletion docker/python/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.8.10-slim as base
FROM python:3.9.10-slim as base
#
# USAGE:
# cd services/osparc-python-runner
Expand All @@ -21,6 +21,8 @@ RUN apt-get update \
&& apt-get -y install --no-install-recommends \
jq \
&& rm --recursive --force /var/lib/apt/lists/*
# install uv
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/

# -------------------------- Build stage -------------------
# Installs build/package management tools and third party dependencies
Expand Down
109 changes: 60 additions & 49 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,76 +1,75 @@
#
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
# This file is autogenerated by pip-compile with Python 3.9
# by the following command:
#
# pip-compile --output-file=requirements.txt
#
arrow==1.2.2
# via jinja2-time
attrs==21.4.0
arrow==1.3.0
# via cookiecutter
attrs==25.3.0
# via
# jsonschema
# referencing
binaryornot==0.4.4
# via cookiecutter
black==23.7.0
black==25.1.0
# via -r requirements.in
bump2version==1.0.1
# via bumpversion
bumpversion==0.6.0
# via -r requirements.in
certifi==2021.10.8
certifi==2025.4.26
# via requests
chardet==4.0.0
chardet==5.2.0
# via binaryornot
charset-normalizer==2.0.12
charset-normalizer==3.4.2
# via requests
click==8.1.0
click==8.1.8
# via
# black
# cookiecutter
cookiecutter==2.1.1
cookiecutter==2.6.0
# via pytest-cookies
coverage[toml]==6.3.2
coverage[toml]==7.8.0
# via
# -r requirements.in
# pytest-cov
docker==6.0.0
docker==7.1.0
# via -r requirements.in
idna==3.3
exceptiongroup==1.3.0
# via pytest
idna==3.10
# via requests
iniconfig==1.1.1
iniconfig==2.1.0
# via pytest
jinja2==3.1.1
# via
# cookiecutter
# jinja2-time
jinja2-time==0.2.0
jinja2==3.1.6
# via cookiecutter
jsonschema==4.19.0
jsonschema==4.23.0
# via -r requirements.in
markupsafe==2.1.1
jsonschema-specifications==2025.4.1
# via jsonschema
markdown-it-py==3.0.0
# via rich
markupsafe==3.0.2
# via jinja2
mypy-extensions==0.4.3
mdurl==0.1.2
# via markdown-it-py
mypy-extensions==1.1.0
# via black
packaging==23.0
packaging==25.0
# via
# black
# docker
# pytest
# pytest-sugar
pathspec==0.9.0
pathspec==0.12.1
# via black
platformdirs==2.5.1
platformdirs==4.3.8
# via black
pluggy==1.0.0
pluggy==1.6.0
# via pytest
py==1.11.0
# via pytest
pyparsing==3.0.7
# via packaging
pyrsistent==0.18.1
# via jsonschema
pytest==7.1.3
pygments==2.19.1
# via rich
pytest==8.3.5
# via
# -r requirements.in
# pytest-cookies
Expand All @@ -80,44 +79,56 @@ pytest==7.1.3
# pytest-sugar
pytest-cookies==0.7.0
# via -r requirements.in
pytest-cov==4.1.0
pytest-cov==6.1.1
# via -r requirements.in
pytest-instafail==0.5.0
# via -r requirements.in
pytest-mock==3.11.1
pytest-mock==3.14.0
# via -r requirements.in
pytest-sugar==0.9.7
pytest-sugar==1.0.0
# via -r requirements.in
python-dateutil==2.8.2
python-dateutil==2.9.0.post0
# via arrow
python-slugify==6.1.1
python-slugify==8.0.4
# via cookiecutter
pyyaml==6.0.1
pyyaml==6.0.2
# via
# -r requirements.in
# cookiecutter
requests==2.27.1
referencing==0.36.2
# via
# jsonschema
# jsonschema-specifications
requests==2.32.3
# via
# cookiecutter
# docker
rpds-py==0.8.10
rich==14.0.0
# via cookiecutter
rpds-py==0.25.0
# via
# jsonschema
# referencing
six==1.16.0
six==1.17.0
# via python-dateutil
termcolor==1.1.0
termcolor==3.1.0
# via pytest-sugar
text-unidecode==1.3
# via python-slugify
tomli==2.0.1
tomli==2.2.1
# via
# black
# coverage
# pytest
urllib3==1.26.9
types-python-dateutil==2.9.0.20250516
# via arrow
typing-extensions==4.13.2
# via
# black
# exceptiongroup
# referencing
# rich
urllib3==2.4.0
# via
# docker
# requests
websocket-client==1.3.2
# via docker
9 changes: 4 additions & 5 deletions src/osparc_python_runner/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,17 +117,16 @@ def setup():
"set -o nounset",
"IFS=$(printf '\\n\\t')",
'echo "Creating virtual environment ..."',
f'python3 -m venv --system-site-packages --symlinks --upgrade "{venv_dir}"',
f'"{venv_dir}/bin/pip" install -U pip wheel setuptools',
f'"{venv_dir}/bin/pip" install -r "{requirements_txt}"',
f'python3 -m virtualenv --system-site-packages --symlinks --without-pip "{venv_dir}"',
'uv pip install -U pip wheel setuptools',
f'uv pip install -r "{requirements_txt}"',
"\n".join(bash_input_env_export),
"\n".join(bash_output_env_export),
f'echo "Executing code {user_code_entrypoint.name}..."',
f'"{venv_dir}/bin/python3" "{user_code_entrypoint}"',
'echo "DONE ..."',
]
main_script_path = Path("main.sh")
main_script_path.write_text("\n".join(script))
Path("main.sh").write_text("\n".join(script))


def teardown():
Expand Down
Loading