Skip to content

Commit

Permalink
First version
Browse files Browse the repository at this point in the history
  • Loading branch information
elisabettai committed Apr 23, 2024
0 parents commit 3ee22ad
Show file tree
Hide file tree
Showing 25 changed files with 1,773 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[bumpversion]
current_version = 1.0.0
commit = False
message = service version: {current_version} → {new_version}
tag = False

[bumpversion:file:.osparc/metadata.yml]
search = {current_version}
replace = {new_version}

[bumpversion:file:Makefile]
search = {current_version}
replace = {new_version}

[bumpversion:file:docker compose-local.yml]
search = {current_version}
replace = {new_version}
40 changes: 40 additions & 0 deletions .cookiecutterrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# This file exists so you can easily regenerate your project.
#
# `cookiepatcher` is a convenient shim around `cookiecutter`
# for regenerating projects (it will generate a .cookiecutterrc
# automatically for any template). To use it:
#
# pip install cookiepatcher
# cookiepatcher gh:itisfoundation/cookiecutter-osparc-service project-path
#
# See:
# https://pypi.python.org/pypi/cookiepatcher
#
# Alternatively, you can run:
#
# cookiecutter --overwrite-if-exists --config-file=project-path/.cookiecutterrc gh:itisfoundation/cookiecutter-osparc-service
#

default_context:

_checkout: None
_output_dir: '/home/iavarone/repos'
_repo_dir: '/home/iavarone/.cookiecutters/cookiecutter-osparc-jupyterlab-service'
_template: 'git+ssh://[email protected]/ITISFoundation/cookiecutter-osparc-jupyterlab-service'
author_affiliation: "IT'IS Foundation"
author_email: '[email protected]'
author_name: 'Elisabetta Iavarone'
contact_email: '[email protected]'
docker_base: 'custom:julia'
git_repo: 'github'
git_username: 'elisabettai'
number_of_inputs: '4'
number_of_outputs: '4'
project_name: 'Jupyterlab Julia'
project_package_name: 'jupyterlab_julia'
project_short_description: 'JupyterLab coding environment for creating interactive Jupyter Notebooks with Julia (or Python)'
project_slug: 'jupyterlab-julia'
release_date: '2024'
resources_CPU_nanoCPUs: '4000000000'
resources_RAM_nanoBytes: '16000000000'
version: '1.0.0'
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/ask_question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: 💬 Question
about: Ask a question
labels: question
---

## What version of this service are you using?

<!--
Different ways are possible.
If you have the service open in o²S²PARC, the service version can be found under the "More Options" menu:
-->

## How can we help you?
43 changes: 43 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: 🐛 Bug
about: File a bug/issue
labels: bug
---

## What version of this service are you using?




<!--
Different ways are possible.
If you have the service open in o²S²PARC, the service version can be found under the "More Options" menu:
-->
## Long story short

<!-- Please describe your problem and why the fix is important. -->

## Expected behaviour

<!-- What is the behaviour you expect? -->

## Actual behaviour

<!-- What's actually happening? -->

## Steps to reproduce

<!-- Please describe steps to reproduce the issue.
If you have a script that does that please include it here within
markdown code markup -->

## Your environment

<!-- Describe the environment you have that lead to your issue.
This includes aiohttp version, OS, proxy server and other bits that
are related to your case.
IMPORTANT: aiohttp is both server framework and client library.
For getting rid of confusing please put 'server', 'client' or 'both'
word here.
-->
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: ✨ Feature request
about: Suggest an idea to implement
labels: enhancement
---

## User Story

<!-- A clear and concise description of how the feature works and looks like from the user's perspective.
Ex. I want to be able the stop the running pipeline by pressing a stop button. If the pipeline is stopped, I see a info-level message confirming it in the logger, if it fails the message should be displayed in red (error). Also, all the progress bars in the nodes must be set to 0. -->

## Example

<!-- Any file/screenshot/photomontage/video/website is provided for a better understanding of the request -->


## Definition of Done
<!--
A clear and concise description of what the feature requires.
1. Play button turns into stop button when pipeline is running
2. Stop button turns into play button when pipeline is finished
3. Stop button turns into play button when pipeline is successfully stopped
4. Logger displays messages everytime the play/stop button is pressed
5. Progress bars are set to 0 when stopping pipeline
6. Stop button has a Python interface -->
22 changes: 22 additions & 0 deletions .github/workflows/check-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Build and check image

on: [push, pull_request]

jobs:
verify-image-build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo content
uses: actions/checkout@v2
- name: ooil version
uses: docker://itisfoundation/ci-service-integration-library:v1.0.4
with:
args: ooil --version
- name: Assemble docker compose spec
uses: docker://itisfoundation/ci-service-integration-library:v1.0.4
with:
args: ooil compose
- name: Build all images if multiple
uses: docker://itisfoundation/ci-service-integration-library:v1.0.4
with:
args: docker compose build
22 changes: 22 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## Common.gitignore

# temporary folders
tmp/

# explicit mark
*ignore*
.tmp*

# vscode configuration
.vscode

# make outputs
pytest_*.xml
docker-compose.yml

# validation folder
!validation/**/*
# docker ignore
!.dockerignore
# git ignore
!.gitignore
5 changes: 5 additions & 0 deletions .osparc/docker-compose.overwrite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version: "3.7"
services:
jupyterlab-julia:
build:
dockerfile: Dockerfile
78 changes: 78 additions & 0 deletions .osparc/metadata.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Jupyterlab Julia
key: simcore/services/dynamic/jupyterlab-julia
type: dynamic
integration-version: 2.0.0
version: 1.0.0
description: JupyterLab coding environment for creating interactive Jupyter Notebooks with Julia (or Python)
contact: [email protected]
thumbnail: https://ih1.redbubble.net/image.1456778886.5914/bg,f8f8f8-flat,750x,075,f-pad,750x1000,f8f8f8.jpg
authors:
- name: Elisabetta Iavarone
email: [email protected]
affiliation: IT'IS Foundation
inputs:
input_1:
displayOrder: 1
label: input_file_1
description:
Any input files. One or several files compressed in a zip will be
downloaded in an inputs folder.
type: data:*/*
input_2:
displayOrder: 2
label: input_file_2
description:
Any input files. One or several files compressed in a zip will be
downloaded in an inputs folder.
type: data:*/*
input_3:
displayOrder: 3
label: input_file_3
description:
Any input files. One or several files compressed in a zip will be
downloaded in an inputs folder.
type: data:*/*
input_4:
displayOrder: 4
label: input_file_4
description:
Any input files. One or several files compressed in a zip will be
downloaded in an inputs folder.
type: data:*/*

outputs:
output_1:
displayOrder: 1
label: output_files_1
description: Output files uploaded from the outputs folder
type: data:*/*
output_2:
displayOrder: 2
label: output_files_2
description: Output files uploaded from the outputs folder
type: data:*/*
output_3:
displayOrder: 3
label: output_files_3
description: Output files uploaded from the outputs folder
type: data:*/*
output_4:
displayOrder: 4
label: output_files_4
description: Output files uploaded from the outputs folder
type: data:*/*

boot-options:
boot_mode:
label: Boot mode
description: Select boot type for the service (only for python-based ones)
default: "0"
items:
"0":
label: JupyterLab
description: Display the JupyterLab interface in the default boot mode
"1":
label: Voila
description:
To start as Voila save a notebook as "voila.ipynb" in the root
folder
20 changes: 20 additions & 0 deletions .osparc/runtime.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
restart-policy: no-restart
settings:
- name: ports
type: int
value: 8888
- name: constraints
type: string
value:
- node.platform.os == linux
- name: Resources
type: Resources
value:
Limits:
NanoCPUs: 4000000000
MemoryBytes: 16000000000
paths-mapping:
inputs_path: /home/jovyan/work/inputs
outputs_path: /home/jovyan/work/outputs
state_paths:
- /home/jovyan/work/workspace
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Changelog

## [1.0.0] - 23 Apr. 2024
- First version
91 changes: 91 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@






# Follow the instructions below to install the desired julia version in the base Jupyterlab image
FROM "quay.io/jupyter/minimal-notebook:python-3.11" as base


LABEL maintainer=elisabettai

ENV JUPYTER_ENABLE_LAB="yes"
# autentication is disabled for now
ENV NOTEBOOK_TOKEN=""
ENV NOTEBOOK_BASE_DIR="$HOME/work"

USER root

ENV HOME="/home/$NB_USER"

# --------------- Add additional system libraries -------------------
# TODO: do you need additional system libraries (e.g. zip, bc, etc...)?
# If yes, uncomment the following and adapt
# If not, remove the following (or leave commented)

# RUN apt-get update && \
# apt-get install -y --no-install-recommends \
# bc \
# zip \
# && \
# apt-get clean && rm -rf /var/lib/apt/lists/*








USER root
ENV COOKIE_JULIA_VERSION=1.6.0

ENV JULIA_DEPOT_PATH=/opt/julia \
JULIA_PKGDIR=/opt/julia

# Setup Julia
COPY setup-scripts/ /opt/setup-scripts
RUN /opt/setup-scripts/setup_julia.py ${COOKIE_JULIA_VERSION}

USER ${NB_UID}

# Setup IJulia kernel
RUN /opt/setup-scripts/setup-julia-packages.bash

# ------------------------- Other kernel -------------------------------------------
# This will install the additional packages that from you Project.toml and Manifestl.toml in the pre-existing Julia kernel.
COPY --chown=$NB_UID:$NB_GID env-config/julia/* ${JULIA_PKGDIR}
RUN julia --project=${JULIA_PKGDIR} -e 'using Pkg; Pkg.instantiate()'
## ------------------------------------------------------------------------


# ---------------- Final setup --------------------------------------------------------

USER root

RUN apt-get update && \
apt-get install -y --no-install-recommends \
gosu \
&& \
apt-get clean && rm -rf /var/lib/apt/lists/*

# Run a script from the base image to fix files permission
#RUN fix-permissions /home/$NB_USER

# copy README and CHANGELOG
COPY --chown=$NB_UID:$NB_GID README.ipynb ${NOTEBOOK_BASE_DIR}/README.ipynb
COPY --chown=$NB_UID:$NB_GID CHANGELOG.md ${NOTEBOOK_BASE_DIR}/CHANGELOG.md

# remove write permissions from files which are not supposed to be edited
RUN chmod gu-w ${NOTEBOOK_BASE_DIR}/CHANGELOG.md && \
chmod gu-w ${NOTEBOOK_BASE_DIR}/${REQ_FILE}

RUN mkdir --parents "/home/${NB_USER}/.virtual_documents" && \
chown --recursive "$NB_USER" "/home/${NB_USER}/.virtual_documents"
ENV JP_LSP_VIRTUAL_DIR="/home/${NB_USER}/.virtual_documents"

# Copying boot scripts
COPY --chown=$NB_UID:$NB_GID boot_scripts/ /docker

ENTRYPOINT [ "/bin/bash", "/docker/entrypoint.bash" ]
Loading

0 comments on commit 3ee22ad

Please sign in to comment.