-
Notifications
You must be signed in to change notification settings - Fork 3k
Add jupyter/julia-notebook #1926
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
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
59da10e
Add jupyter/julia-notebook
yuvipanda 0606052
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 03e1726
Add a test for julia-notebook
yuvipanda 1c8cd3e
Tell tests what julia-notebook inherits from
yuvipanda 02f37c5
Sort lists with julia-notebook
yuvipanda 3b12edd
Fix README for julia-notebook
yuvipanda 1956c10
Add julia-notebook to the makefile
yuvipanda c34ce42
Move julia-notebook below r-notebook
yuvipanda 59698ca
Use hard tabs in Makefile
yuvipanda e9a1a24
Do some more sorting
yuvipanda ba13383
Rename test_julia to avoid mypy issue
yuvipanda 952193b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 013137e
Re-order julia/r-notebook
yuvipanda 1956521
Move julia-notebook stanza under r-notebook
yuvipanda 0caeb95
Update inheritance diagram
yuvipanda 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
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 |
---|---|---|
|
@@ -24,6 +24,7 @@ on: | |
- "base-notebook/**" | ||
- "datascience-notebook/**" | ||
- "docker-stacks-foundation/**" | ||
- "julia-notebook/**" | ||
- "minimal-notebook/**" | ||
- "pyspark-notebook/**" | ||
- "r-notebook/**" | ||
|
@@ -51,6 +52,7 @@ on: | |
- "base-notebook/**" | ||
- "datascience-notebook/**" | ||
- "docker-stacks-foundation/**" | ||
- "julia-notebook/**" | ||
- "minimal-notebook/**" | ||
- "pyspark-notebook/**" | ||
- "r-notebook/**" | ||
|
@@ -162,6 +164,25 @@ jobs: | |
runsOn: ubuntu-latest | ||
needs: [x86_64-minimal] | ||
|
||
aarch64-julia: | ||
uses: ./.github/workflows/docker-build-test-upload.yml | ||
with: | ||
parentImage: minimal-notebook | ||
image: julia-notebook | ||
platform: aarch64 | ||
runsOn: ARM64 | ||
needs: [aarch64-minimal] | ||
if: github.repository == 'jupyter/docker-stacks' | ||
|
||
x86_64-julia: | ||
uses: ./.github/workflows/docker-build-test-upload.yml | ||
with: | ||
parentImage: minimal-notebook | ||
image: julia-notebook | ||
platform: x86_64 | ||
runsOn: ubuntu-latest | ||
needs: [x86_64-minimal] | ||
|
||
aarch64-tensorflow: | ||
uses: ./.github/workflows/docker-build-test-upload.yml | ||
with: | ||
|
@@ -254,6 +275,7 @@ jobs: | |
minimal-notebook, | ||
scipy-notebook, | ||
r-notebook, | ||
julia-notebook, | ||
tensorflow-notebook, | ||
datascience-notebook, | ||
pyspark-notebook, | ||
|
@@ -290,6 +312,7 @@ jobs: | |
minimal-notebook, | ||
scipy-notebook, | ||
r-notebook, | ||
julia-notebook, | ||
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. We forgot to add a new |
||
tensorflow-notebook, | ||
datascience-notebook, | ||
pyspark-notebook, | ||
|
@@ -324,6 +347,7 @@ jobs: | |
minimal-notebook, | ||
scipy-notebook, | ||
r-notebook, | ||
julia-notebook, | ||
tensorflow-notebook, | ||
datascience-notebook, | ||
pyspark-notebook, | ||
|
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Documentation | ||
README.md |
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,67 @@ | ||
# Copyright (c) Jupyter Development Team. | ||
# Distributed under the terms of the Modified BSD License. | ||
ARG OWNER=jupyter | ||
ARG BASE_CONTAINER=$OWNER/minimal-notebook | ||
FROM $BASE_CONTAINER | ||
|
||
LABEL maintainer="Jupyter Project <jupyter@googlegroups.com>" | ||
|
||
# Fix: https://github.com/hadolint/hadolint/wiki/DL4006 | ||
# Fix: https://github.com/koalaman/shellcheck/wiki/SC3014 | ||
SHELL ["/bin/bash", "-o", "pipefail", "-c"] | ||
|
||
USER root | ||
|
||
# Julia installation | ||
# Default values can be overridden at build time | ||
# (ARGS are in lower case to distinguish them from ENV) | ||
# Check https://julialang.org/downloads/ | ||
ARG julia_version="1.9.1" | ||
|
||
# Julia dependencies | ||
# install Julia packages in /opt/julia instead of ${HOME} | ||
ENV JULIA_DEPOT_PATH=/opt/julia \ | ||
JULIA_PKGDIR=/opt/julia \ | ||
JULIA_VERSION="${julia_version}" | ||
|
||
WORKDIR /tmp | ||
|
||
# hadolint ignore=SC2046 | ||
RUN set -x && \ | ||
julia_arch=$(uname -m) && \ | ||
julia_short_arch="${julia_arch}" && \ | ||
if [ "${julia_short_arch}" == "x86_64" ]; then \ | ||
julia_short_arch="x64"; \ | ||
fi; \ | ||
julia_installer="julia-${JULIA_VERSION}-linux-${julia_arch}.tar.gz" && \ | ||
julia_major_minor=$(echo "${JULIA_VERSION}" | cut -d. -f 1,2) && \ | ||
mkdir "/opt/julia-${JULIA_VERSION}" && \ | ||
wget --progress=dot:giga "https://julialang-s3.julialang.org/bin/linux/${julia_short_arch}/${julia_major_minor}/${julia_installer}" && \ | ||
tar xzf "${julia_installer}" -C "/opt/julia-${JULIA_VERSION}" --strip-components=1 && \ | ||
rm "${julia_installer}" && \ | ||
ln -fs /opt/julia-*/bin/julia /usr/local/bin/julia | ||
|
||
# Show Julia where conda libraries are \ | ||
RUN mkdir /etc/julia && \ | ||
echo "push!(Libdl.DL_LOAD_PATH, \"${CONDA_DIR}/lib\")" >> /etc/julia/juliarc.jl && \ | ||
# Create JULIA_PKGDIR \ | ||
mkdir "${JULIA_PKGDIR}" && \ | ||
chown "${NB_USER}" "${JULIA_PKGDIR}" && \ | ||
fix-permissions "${JULIA_PKGDIR}" | ||
|
||
USER ${NB_UID} | ||
|
||
# Add Julia packages. | ||
# Install IJulia as jovyan and then move the kernelspec out | ||
# to the system share location. Avoids problems with runtime UID change not | ||
# taking effect properly on the .local folder in the jovyan home dir. | ||
RUN julia -e 'import Pkg; Pkg.update()' && \ | ||
julia -e 'import Pkg; Pkg.add("HDF5")' && \ | ||
julia -e 'using Pkg; pkg"add IJulia"; pkg"precompile"' && \ | ||
# move kernelspec out of home \ | ||
mv "${HOME}/.local/share/jupyter/kernels/julia"* "${CONDA_DIR}/share/jupyter/kernels/" && \ | ||
chmod -R go+rx "${CONDA_DIR}/share/jupyter" && \ | ||
rm -rf "${HOME}/.local" && \ | ||
fix-permissions "${JULIA_PKGDIR}" "${CONDA_DIR}/share/jupyter" | ||
|
||
WORKDIR "${HOME}" |
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,12 @@ | ||
# Jupyter Notebook Julia Stack | ||
|
||
[](https://hub.docker.com/r/jupyter/julia-notebook/) | ||
[](https://hub.docker.com/r/jupyter/julia-notebook/) | ||
[](https://hub.docker.com/r/jupyter/julia-notebook/ "jupyter/julia-notebook image size") | ||
|
||
GitHub Actions in the <https://github.com/jupyter/docker-stacks> project builds and pushes this image to Docker Hub. | ||
|
||
Please visit the project documentation site for help to use and contribute to this image and others. | ||
|
||
- [Jupyter Docker Stacks on ReadTheDocs](https://jupyter-docker-stacks.readthedocs.io/en/latest/index.html) | ||
- [Selecting an Image :: Core Stacks :: jupyter/julia-notebook](https://jupyter-docker-stacks.readthedocs.io/en/latest/using/selecting.html#jupyter-julia-notebook) |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Copyright (c) Jupyter Development Team. | ||
# Distributed under the terms of the Modified BSD License. | ||
import logging | ||
|
||
from tests.conftest import TrackedContainer | ||
|
||
LOGGER = logging.getLogger(__name__) | ||
|
||
|
||
def test_julia(container: TrackedContainer) -> None: | ||
"""Basic julia test""" | ||
LOGGER.info("Test that julia is correctly installed ...") | ||
logs = container.run_and_wait( | ||
timeout=5, | ||
tty=True, | ||
command=["start.sh", "bash", "-c", "julia --version"], | ||
) | ||
LOGGER.debug(logs) |
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.
We forgot to add a new
julia
dependency inneeds:
in a few lines below.