-
Notifications
You must be signed in to change notification settings - Fork 10
Add semi-automatic migration from classic to modern dy-services #160
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
Open
mrnicegyu11
wants to merge
12
commits into
ITISFoundation:master
Choose a base branch
from
mrnicegyu11:2025/migrateClassicToDynamic
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 9 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
90d17b9
init: tissue properties
mrnicegyu11 db13562
init: tissue properties
mrnicegyu11 cc8a919
Upgrade raw-graphs and tissue-properties
mrnicegyu11 b357813
do jupyter-base
mrnicegyu11 5d2ba4e
Progress
mrnicegyu11 349f468
Fix jupyter base notebook permissions
mrnicegyu11 2e917f3
Make 3D Viewer build
mrnicegyu11 3072ec2
3d viewer changes
mrnicegyu11 248f24c
add tissue properties fixes
mrnicegyu11 cfba726
Fix tissue properties inputs outputs
mrnicegyu11 53e2042
Fix 3d-viewer-gpu
mrnicegyu11 94cb5b5
MAG change request
mrnicegyu11 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -138,3 +138,6 @@ pytest.ini | |
| # pylint-profile output | ||
| prof/ | ||
| !ci/**/build | ||
|
|
||
| docker-compose.yml | ||
| docker-compose.dev.yml | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,100 @@ | ||
| # this must be the first line | ||
| ARG BASE_IMAGE=kitware/paraviewweb:pv-v5.6.0-osmesa | ||
| # apply patch to visualizer | ||
| FROM node:8.12.0 AS visualizer | ||
| WORKDIR /home/node | ||
| ARG VISUALIZER_VERSION=v3.1.10 | ||
| RUN git clone --branch ${VISUALIZER_VERSION} https://github.com/Kitware/visualizer.git | ||
| WORKDIR /home/node/visualizer | ||
| COPY services/3d-viewer-gpu/src/3d-viewer/rebrand-osparc/to-be-copied . | ||
| COPY services/3d-viewer-gpu/src/3d-viewer/rebrand-osparc/rebrand-osparc.patch rebrand-osparc.patch | ||
| RUN git apply rebrand-osparc.patch && \ | ||
| npm install && \ | ||
| npm run build:release && \ | ||
| npm link && \ | ||
| cp src/*.png dist | ||
| # ---------------------------------------------------------------- | ||
| # build visualizer service | ||
| FROM ${BASE_IMAGE} AS common | ||
|
|
||
| LABEL maintainer="sanderegg" | ||
| ENV PARAVIEW_INPUT_PATH="/data" | ||
|
|
||
| USER root | ||
| # install git, pip | ||
| RUN apt-get update && \ | ||
| apt-get install -y --no-install-recommends \ | ||
| python3-pip &&\ | ||
| rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # install python 3.6 for root and also for www-data | ||
| ENV PYENV_ROOT=/pyenv | ||
| # necessary to prevent some dependencies to ask questions while installing | ||
| ENV DEBIAN_FRONTEND=noninteractive | ||
| RUN curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash && \ | ||
| export PATH="${PYENV_ROOT}/bin:$PATH" && \ | ||
| eval "$(pyenv init -)" && \ | ||
| eval "$(pyenv virtualenv-init -)" && \ | ||
| apt-get update && \ | ||
| apt-get install -y --no-install-recommends \ | ||
| make build-essential libssl-dev zlib1g-dev libbz2-dev \ | ||
| libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \ | ||
| xz-utils tk-dev libffi-dev liblzma-dev && \ | ||
| pyenv install 3.6.7 && \ | ||
| pyenv global 3.6.7 && \ | ||
| pip install --upgrade pip wheel setuptools &&\ | ||
| apt-get remove -y make build-essential libssl-dev zlib1g-dev libbz2-dev \ | ||
| libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \ | ||
| xz-utils tk-dev libffi-dev liblzma-dev &&\ | ||
| apt-get autoremove -y &&\ | ||
| apt-get clean -y &&\ | ||
| rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # get the patched visualizer | ||
| COPY --from=visualizer /home/node/visualizer/dist /opt/paraview/share/paraview-5.6/web/visualizer/www | ||
| WORKDIR /home/root | ||
| # ---------------------------------------------------------------- | ||
| # set up oSparc env variables | ||
| ENV SIMCORE_NODE_UUID="-1" \ | ||
| SIMCORE_USER_ID="-1" \ | ||
| SIMCORE_NODE_BASEPATH="" \ | ||
| SIMCORE_NODE_APP_STATE_PATH=${PARAVIEW_INPUT_PATH} \ | ||
| SIMCORE_HOST_NAME="localhost" \ | ||
| STORAGE_ENDPOINT="=1" \ | ||
| S3_ENDPOINT="=1" \ | ||
| S3_ACCESS_KEY="-1" \ | ||
| S3_SECRET_KEY="-1" \ | ||
| S3_BUCKET_NAME="-1" \ | ||
| POSTGRES_ENDPOINT="-1" \ | ||
| POSTGRES_USER="-1" \ | ||
| POSTGRES_PASSWORD="-1" \ | ||
| POSTGRES_DB="-1" | ||
|
|
||
| # special paraview variables | ||
| ENV SERVER_PORT="80" \ | ||
| SIMCORE_STATE_FILE="simcore-state.pvsm" \ | ||
| PARAVIEW_DEBUG=0 | ||
|
|
||
| RUN mkdir /home/root/trigger && \ | ||
| chmod 777 /home/root/trigger | ||
|
|
||
|
|
||
| #------------------------------------------ | ||
| FROM common AS production | ||
| # will start to run after interval every interval. fails after timeout. fail do not count if during start-period. will do # retries | ||
| HEALTHCHECK --interval=10s --timeout=30s --start-period=1s --retries=3 CMD [ "python3", "/home/root/docker/healthcheck_curl_host.py", "http://localhost", "/" ] | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| # copy scripts | ||
| COPY services/3d-viewer-gpu/docker/custom /home/root/docker | ||
| COPY services/3d-viewer-gpu/src/3d-viewer/utils /home/root/utils | ||
| COPY services/3d-viewer-gpu/src/3d-viewer/config /home/root/config | ||
| COPY services/3d-viewer-gpu/src/3d-viewer/handlers/*.rpy /opt/paraview/share/paraview-5.6/web/visualizer/www/ | ||
|
|
||
| ENTRYPOINT [ "/bin/bash", "docker/entrypoint.bash" ] | ||
| #------------------------------------------ | ||
| FROM common as development | ||
| ENV CREATE_DUMMY_TABLE 1 | ||
| ENV USE_CASE_CONFIG_FILE="devel/port_config.json" | ||
| ENV TEST_DATA_PATH="/test-data" | ||
| # Need to use entrypoint as base image's entrypoint must be overriden | ||
| ENTRYPOINT [ "/bin/bash", "docker/entrypoint.bash" ] | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| REPO_BASE_DIR := $(realpath $(dir $(abspath $(lastword $(MAKEFILE_LIST)../../..)))) | ||
|
|
||
| # TARGETS -------------------------------------------------- | ||
| include ${REPO_BASE_DIR}/scripts/common.Makefile | ||
| .DEFAULT_GOAL := help |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| services: | ||
| "3d-viewer-gpu": # Add all service names here | ||
| build: | ||
| context: . | ||
| dockerfile: .osparc/3d-viewer-gpu/Dockerfile | ||
| target: production # Adjust this to match the dockerfile, might be 'production' or 'prod' or even no target at all | ||
| args: | ||
| BASE_IMAGE: kitware/paraviewweb:pv-v5.6.0-egl | ||
| VISUALIZER_VERSION: v3.1.6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| name: 3d-viewer-gpu | ||
| thumbnail: | ||
| description: "Paraview Web-based Visualizer" | ||
| key: simcore/services/dynamic/3d-viewer-gpu | ||
| version: 3.0.5 | ||
| integration-version: 2.0.0 | ||
| version_display: 3.0.5 | ||
| type: dynamic | ||
| authors: | ||
| - name: "Sylvain Anderegg" | ||
| email: "anderegg@itis.swiss" | ||
| affiliation: "IT'IS Foundation" | ||
| contact: anderegg@itis.swiss | ||
| inputs: | ||
| A: | ||
| displayOrder: 1.0 | ||
| label: "A" | ||
| description: "Any paraview compatible dataset. 1 dataset or N dataset compressed in a zip file." | ||
| type: "data:*/*" | ||
| B: | ||
| displayOrder: 1.0 | ||
| label: "B" | ||
| description: "Any paraview compatible dataset. 1 dataset or N dataset compressed in a zip file." | ||
| type: "data:*/*" | ||
|
|
||
| outputs: {} | ||
|
|
||
| boot-options: | ||
| boot_mode: | ||
| label: Boot mode | ||
| description: Boot mode | ||
| default: "0" | ||
| items: | ||
| "0": | ||
| label: default | ||
| description: default |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| name: {{ compose.services[service_name].build.labels["io.simcore.name"]["name"]}} | ||
| thumbnail: {{""}} | ||
| description: "{{ compose.services[service_name].build.labels["io.simcore.description"]["description"]}}" | ||
| key: {{ compose.services[service_name].build.labels["io.simcore.key"]["key"]}} | ||
| version: {{ desired_version }} | ||
| integration-version: 2.0.0 | ||
| version_display: {{ desired_version }} | ||
| type: dynamic | ||
| authors: | ||
| {% for author in compose.services[service_name].build.labels["io.simcore.authors"]["authors"] %} | ||
| - name: "{{ author.name }}" | ||
| email: "{{ author.email }}" | ||
| affiliation: "{{ author.affiliation }}" | ||
| {% endfor %} | ||
| contact: {{ compose.services[service_name].build.labels["io.simcore.authors"]["authors"][0]["email"]}} | ||
| {% if compose.services[service_name].build.labels["io.simcore.inputs"]["inputs"] %} | ||
| inputs: | ||
| {% for name, input_def in compose.services[service_name].build.labels["io.simcore.inputs"]["inputs"].items() %} | ||
| {{ name }}: | ||
| displayOrder: {{ input_def.displayOrder | float }} | ||
| label: "{{ input_def.label }}" | ||
| description: "{{ input_def.description }}" | ||
| type: "{{ input_def.type }}" | ||
| {% endfor %} | ||
| {% else %} | ||
| inputs: {} | ||
| {% endif %} | ||
|
|
||
| {% if compose.services[service_name].build.labels["io.simcore.outputs"]["outputs"] %} | ||
| outputs: | ||
| {% for name, details in compose.services[service_name].build.labels["io.simcore.outputs"]["outputs"].items() %} | ||
| {{ name }}: | ||
| displayOrder: {{ details.displayOrder | float }} | ||
| label: "{{ details.label }}" | ||
| description: "{{ details.description }}" | ||
| type: "{{ details.type }}" | ||
| {% if details.fileToKeyMap %} | ||
| fileToKeyMap: | ||
| {% for file, key in details.fileToKeyMap.items() %} | ||
| {{ file }}: {{ key }} | ||
| {% endfor %} | ||
| {% endif %} | ||
| {% endfor %} | ||
| {% else %} | ||
| outputs: {} | ||
| {% endif %} | ||
|
|
||
| boot-options: | ||
| boot_mode: | ||
| label: Boot mode | ||
| description: Boot mode | ||
| default: "0" | ||
| items: | ||
| "0": | ||
| label: default | ||
| description: default |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| settings: | ||
| - name: "ports" | ||
| type: "int" | ||
| value: | ||
| 80 | ||
| - name: "constraints" | ||
| type: "string" | ||
| value: | ||
| - node.platform.os == linux | ||
| - name: "Resources" | ||
| type: "Resources" | ||
| value: | ||
| Limits: {'NanoCPUs': 4000000000, 'MemoryBytes': 17179869184} | ||
| Reservations: {'NanoCPUs': 100000000, 'MemoryBytes': 536870912, 'GenericResources': [{'DiscreteResourceSpec': {'Kind': 'VRAM', 'Value': 1}}]} | ||
| paths-mapping: # Watch this carefully and potentially adjust | ||
| outputs_path: "/home/scu/output" | ||
| inputs_path: "/data" | ||
| state_paths: [] | ||
| compose-spec: | ||
| version: "3.7" | ||
| services: | ||
| 3d-viewer-gpu: | ||
| image: $${SIMCORE_REGISTRY}/simcore/services/dynamic/3d-viewer-gpu:$${SERVICE_VERSION} | ||
| environment: | ||
| container-http-entrypoint: 3d-viewer-gpu |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| {% if compose.services[service_name].build.labels["simcore.service.settings"] %} | ||
| settings: | ||
| {% for setting in compose.services[service_name].build.labels["simcore.service.settings"] %} | ||
| - name: "{{ setting.name }}" | ||
| type: "{{ setting.type }}" | ||
| value: | ||
| {% if setting.value is mapping %} | ||
| {% for k, v in setting.value.items() %} | ||
| {{ k }}: {{ v }} | ||
| {% endfor %} | ||
| {% elif setting.value is iterable and not setting.value is string %} | ||
| {% for v in setting.value %} | ||
| - {{ v }} | ||
| {% endfor %} | ||
| {% else %} | ||
| {{ setting.value }} | ||
| {% endif %} | ||
| {% endfor %} | ||
| {% else %} | ||
| settings: [] | ||
| {% endif %} | ||
| paths-mapping: # Watch this carefully and potentially adjust | ||
| outputs_path: "/home/scu/output" | ||
| inputs_path: "/data" | ||
| state_paths: [] | ||
| compose-spec: | ||
| version: "3.7" | ||
| services: | ||
| {{ service_name }}: | ||
| image: $${SIMCORE_REGISTRY}/simcore/services/dynamic/{{ service_name }}:$${SERVICE_VERSION} | ||
| environment: | ||
| {% for key, value in compose.services[service_name].environment.items() %} | ||
| {{ key }}: "{{ value | replace('$${', '{{ ') | replace('}', '}') }}" | ||
| {% endfor %} | ||
| container-http-entrypoint: {{ service_name }} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all this should disappear