diff --git a/.github/workflows/docker-publish.yaml b/.github/workflows/docker-publish.yaml index 958745f..fb0ef51 100644 --- a/.github/workflows/docker-publish.yaml +++ b/.github/workflows/docker-publish.yaml @@ -5,9 +5,9 @@ jobs: name: Create and Push Docker Container runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: setup-docker - uses: docker-practice/actions-setup-docker@1.0.11 + uses: docker-practice/actions-setup-docker@master - name: Login to GitHub Container Registry uses: docker/login-action@v2 with: @@ -16,5 +16,5 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and Publish Docker Image run: | - docker build -t ghcr.io/fairdatapipeline/rsecon:latest . - docker push ghcr.io/fairdatapipeline/rsecon:latest + docker build -t ghcr.io/fairdatapipeline/fdptutorial:latest . + docker push ghcr.io/fairdatapipeline/fdptutorial:latest diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..496ee2c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.DS_Store \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index b7109a6..e8553f0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,21 +21,22 @@ RUN apt update && \ libjsoncpp-dev \ curl \ libcurl4-openssl-dev \ - libyaml-cpp-dev + libyaml-cpp-dev \ + imagemagick # Java RUN wget https://services.gradle.org/distributions/gradle-7.5-bin.zip && \ - unzip gradle-*.zip -RUN cp -pr gradle-*/* /usr/local -RUN rm -r gradle-7.5 && \ + unzip gradle-*.zip && \ + cp -pr gradle-*/* /usr/local && \ + rm -r gradle-7.5 && \ rm gradle-7.5-bin.zip && \ mkdir temp # Python Dependencies WORKDIR ${USER_HOME}/temp -RUN wget https://raw.githubusercontent.com/FAIRDataPipeline/FAIR-CLI/develop/pyproject.toml && \ - wget https://raw.githubusercontent.com/FAIRDataPipeline/FAIR-CLI/develop/poetry.lock -RUN mamba install --quiet --yes 'poetry' && \ +RUN wget https://raw.githubusercontent.com/FAIRDataPipeline/FAIR-CLI/main/pyproject.toml && \ + wget https://raw.githubusercontent.com/FAIRDataPipeline/FAIR-CLI/main/poetry.lock && \ + mamba install --quiet --yes 'poetry' && \ mamba clean --all -f -y RUN poetry config virtualenvs.create false \ && poetry install --no-root --no-interaction --no-ansi @@ -52,23 +53,24 @@ RUN git clone https://github.com/FAIRDataPipeline/cppSimpleModel.git && \ git config --global --add safe.directory ${USER_HOME}/DataPipeline.jl && \ git config --global --add safe.directory ${USER_HOME}/javaSimpleModel && \ git config --global --add safe.directory ${USER_HOME}/rSimpleModel && \ + git config --global --add safe.directory ${USER_HOME}/DataPipeline.jl && \ rm -r temp # CPP Simple Model WORKDIR ${USER_HOME}/cppSimpleModel -RUN cmake -Bbuild -RUN cmake --build build -j4 +RUN cmake -Bbuild && \ + cmake --build build -j4 #Julia Simple Model WORKDIR "${USER_HOME}/DataPipeline.jl" RUN git checkout updated-deps && \ julia -e 'using Pkg; Pkg.instantiate()' && \ - julia --project=examples/fdp -e 'using Pkg; Pkg.instantiate()' + julia --project=examples/fdp -e 'using Pkg; Pkg.instantiate()' && \ + julia --project=examples/fdp -e 'using Pkg; Pkg.precompile()' # Java Data Pipeline WORKDIR "${USER_HOME}/javaDataPipeline" -RUN git checkout ro-crate-fix && \ - gradle clean && \ +RUN gradle clean && \ gradle build # Java Simple Model @@ -78,20 +80,30 @@ RUN git checkout local_deps && \ gradle build # R Simple Model -WORKDIR ${USER_HOME}/rSimpleModel +WORKDIR ${USER_HOME}/temp RUN conda config --add channels pcgr && \ + conda config --add channels anaconda && \ conda config --add channels bioconda && \ mamba install --quiet --yes \ + 'pkg-config' \ + 'libcurl' \ 'poppler' \ 'librsvg' \ 'glib' \ - 'bioconductor-rhdf5' \ - 'r-rsvg' \ - 'r-magick' \ - 'r-pdftools' \ + 'libgit2' \ && \ mamba clean --all -f -y -RUN R -e 'cat(withr::with_libpaths(new="/opt/conda/lib/R/library", devtools::install_local() ) )' +RUN wget https://imagemagick.org/archive/ImageMagick.tar.gz && \ + tar xvzf ImageMagick.tar.gz && \ + cd ImageMagick-* && \ + ./configure --prefix=/opt/conda && \ + make && \ + make install +WORKDIR ${USER_HOME}/rSimpleModel +RUN echo 'options(stringsAsFactors = FALSE)' >> /opt/conda/lib/R/etc/Rprofile.site && \ + R -e 'install.packages("magick", lib ="/opt/conda/lib/R/library", repos="https://cloud.r-project.org/", configure.vars="INCLUDE_DIR=/opt/conda/include/ImageMagick-7")' && \ + R -e 'cat(withr::with_libpaths(new="/opt/conda/lib/R/library", devtools::install_local("/home/jovyan/rDataPipeline") ) )' && \ + R -e 'cat(withr::with_libpaths(new="/opt/conda/lib/R/library", devtools::install_local() ) )' WORKDIR ${USER_HOME} COPY ./Notebooks . diff --git a/FAIR-WALKTHROUGH_SLIDES.pdf b/FAIR-WALKTHROUGH_SLIDES.pdf new file mode 100644 index 0000000..5d766fa Binary files /dev/null and b/FAIR-WALKTHROUGH_SLIDES.pdf differ diff --git a/Notebooks/1_registry_cli_install.ipynb b/Notebooks/1_registry_cli_install.ipynb index 166363e..2b319c4 100644 --- a/Notebooks/1_registry_cli_install.ipynb +++ b/Notebooks/1_registry_cli_install.ipynb @@ -17,8 +17,8 @@ "metadata": {}, "outputs": [], "source": [ - "# Install the Local Registry using the ro_crate enabled version\n", - "!fair registry install --version origin/ro_crate" + "# Install the Local Registry\n", + "!fair registry install" ] }, { @@ -48,7 +48,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.5" + "version": "3.11.6" }, "vscode": { "interpreter": { diff --git a/README.md b/README.md index fffa69e..94c7236 100644 --- a/README.md +++ b/README.md @@ -1,33 +1,23 @@ -# RSECon22 Walkthrough: A FAIR Data Pipeline: provenance-driven data management for traceable scientific workflows +# FDP Tutorial -This repo contains the material for the RSECon22 walkthrough titled: [*"A FAIR Data Pipeline: provenance-driven data management for traceable scientific workflows"*](https://virtual.oxfordabstracts.com/#/event/public/3101/submission/113). The walkthrough uses a docker container and Jupyter Labs (formally, a notebook) to run through an example usage of the [FAIR Data Pipeline](https://www.fairdatapipeline.org/). +This repo contains an up to date fork of the material used for RSECon22 walkthrough titled: [*"A FAIR Data Pipeline: provenance-driven data management for traceable scientific workflows"*](https://virtual.oxfordabstracts.com/#/event/public/3101/submission/113). The walkthrough uses a docker container and Jupyter Labs (formally, a notebook) to run through an example usage of the [FAIR Data Pipeline](https://www.fairdatapipeline.org/). You can view the walkthrough presentation in the [Society of Research Software Engineering channel](https://www.youtube.com/watch?v=IZWpmIOhuz0). + +It is meant to be used as a tutorial ## Prerequisites The only prerequisite is an installation of Docker, which is available free from [docker.com](https://www.docker.com/). ## Running the Docker Container -The docker container is available on the GitHub Package Registry and can be pulled using the following command(s): - -### AMD64 -``` -docker pull ghcr.io/fairdatapipeline/rsecon:latest -``` +The docker container is available on the GitHub Package Registry and can be pulled using the following command: -### ARM64 ``` -docker pull ghcr.io/fairdatapipeline/rsecon:aarm64 +docker pull ghcr.io/fairdatapipeline/fdptutorial:latest ``` The container can then be run using the following command: ``` -docker run -p 8000:8000 -p 8888:8888 ghcr.io/fairdatapipeline/rsecon:latest -``` - -OR - -``` -docker run -p 8000:8000 -p 8888:8888 ghcr.io/fairdatapipeline/rsecon:aarm64 +docker run -p 8000:8000 -p 8888:8888 ghcr.io/fairdatapipeline/fdptutorial:latest ``` Once the container has started, there will be an address to access the Jupyter Lab within the console. This address will include a token for authentication to the Jupyter Labs page. The link will take the form of: `http://127.0.0.1:8888/lab?token=`.