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 .bumpversion-pytorch.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.1.1
current_version = 1.1.2
commit = False
message = service version: {current_version} → {new_version}
tag = False
Expand Down
2 changes: 1 addition & 1 deletion .bumpversion-tensorflow.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.1.1
current_version = 1.1.2
commit = False
message = service version: {current_version} → {new_version}
tag = False
Expand Down
2 changes: 1 addition & 1 deletion .osparc/osparc-python-runner-pytorch/metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: oSparc Python Runner PyTorch
key: simcore/services/comp/osparc-python-runner-pytorch
type: computational
integration-version: 2.0.0
version: 1.1.1
version: 1.1.2
description: https://raw.githubusercontent.com/ZurichMedTech/s4l-assets/refs/heads/main/app/full/services/simcore_services_comp_osparc-python-runner-pytorch.md
icon: https://raw.githubusercontent.com/ZurichMedTech/s4l-assets/main/app/icons/s4l/simcore_services_comp_osparc-python-runner-pytorch.png
thumbnail: https://raw.githubusercontent.com/ZurichMedTech/s4l-assets/main/app/thumbnails/s4l/simcore_services_comp_osparc-python-runner-pytorch.png
Expand Down
2 changes: 1 addition & 1 deletion .osparc/osparc-python-runner-tensorflow/metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: oSparc Python Runner Tensorflow
key: simcore/services/comp/osparc-python-runner-tensorflow
type: computational
integration-version: 2.0.0
version: 1.1.1
version: 1.1.2
description: https://raw.githubusercontent.com/ZurichMedTech/s4l-assets/refs/heads/main/app/full/services/simcore_services_comp_osparc-python-runner-tensorflow.md
icon: https://raw.githubusercontent.com/ZurichMedTech/s4l-assets/main/app/icons/s4l/simcore_services_comp_osparc-python-runner-tensorflow.png
thumbnail: https://raw.githubusercontent.com/ZurichMedTech/s4l-assets/main/app/thumbnails/s4l/simcore_services_comp_osparc-python-runner-tensorflow.png
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ SHELL = /bin/sh

export IMAGE_PYTORCH=osparc-python-runner-pytorch
export IMAGE_TENSORFLOW=osparc-python-runner-tensorflow
export TAG_PYTORCH=1.1.1
export TAG_TENSORFLOW=1.1.1
export TAG_PYTORCH=1.1.2
export TAG_TENSORFLOW=1.1.2

# PYTHON ENVIRON ---------------------------------------------------------------------------------------
.PHONY: devenv
Expand Down
5 changes: 3 additions & 2 deletions common/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ ENV UV_HTTP_TIMEOUT=120
# Install Python globally for all users
ARG PYTHON_VERSION=3.12.10
ENV UV_PYTHON_INSTALL_DIR=/opt/uv-python
ENV PATH="/opt/venv/bin:$PATH"
RUN mkdir -p /opt/uv-python \
&& uv venv /opt/venv --python=python${PYTHON_VERSION%.*} \
&& chmod -R a+rx /opt/uv-python
ENV PATH="/opt/venv/bin:$PATH"
&& chmod -R a+rx /opt/uv-python \
&& uv pip install pipreqs

FROM base AS production

Expand Down
24 changes: 11 additions & 13 deletions common/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,27 +46,25 @@ def _find_user_code_entrypoint(code_dir: Path) -> Path:

def _ensure_pip_requirements(code_dir: Path) -> Path:
_logger.info("Searching for requirements file ...")
requirements = list(code_dir.rglob("requirements.txt"))
if len(requirements) > 1:
raise ValueError(f"Many requirements found: {requirements}")
requirements_entries = list(code_dir.rglob("requirements.txt"))
if len(requirements_entries) > 1:
raise ValueError(f"Many requirements found: {requirements_entries}")

elif not requirements:
if not requirements_entries:
# deduce requirements using pipreqs
_logger.info("Not found. Recreating requirements ...")
requirements = code_dir / "requirements.txt"
requirements_path = Path("/tmp") / "requirements.txt"
_logger.info("Not found. Recreating in %s ...", requirements_path)
subprocess.run(
f"pipreqs --savepath={requirements} --force {code_dir}".split(),
f"pipreqs --savepath={requirements_path} --force {code_dir}".split(),
shell=False,
check=True,
cwd=INPUT_FOLDER,
)
return requirements_path

# TODO log subprocess.run

else:
requirements = requirements[0]
_logger.info(f"Found: {requirements}")
return requirements
requirements_path = requirements_entries[0]
_logger.info("Found: %s", requirements_path)
return requirements_path


# TODO: Next version of integration will take care of this and maybe the ENVs as well
Expand Down