Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jupyter-java
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Emmanuel Bruno
jupyter-java
Commits
12669e4b
Commit
12669e4b
authored
2 years ago
by
Emmanuel Bruno
Browse files
Options
Downloads
Patches
Plain Diff
adds CI.
parent
e39fd496
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
.github/workflows/ci.yml
+49
-0
49 additions, 0 deletions
.github/workflows/ci.yml
Dockerfile
+4
-35
4 additions, 35 deletions
Dockerfile
kernel.json
+1
-1
1 addition, 1 deletion
kernel.json
with
54 additions
and
36 deletions
.github/workflows/ci.yml
0 → 100644
+
49
−
0
View file @
12669e4b
name
:
ci
on
:
push
:
branches
:
-
'
releases/v*'
-
'
develop'
tags
:
-
'
v*.*.*'
workflow_dispatch
:
jobs
:
docker
:
runs-on
:
[
self-hosted
,
Linux
,
X64
]
steps
:
-
name
:
Checkout
uses
:
actions/checkout@v3
-
name
:
Set the environment variable
run
:
echo REPOSITORY_NAME=${GITHUB_REPOSITORY#*\/} >> $GITHUB_ENV
-
name
:
Docker meta
id
:
meta
uses
:
docker/metadata-action@v4
with
:
images
:
|
"${{ secrets.DOCKERHUB_USERNAME }}/${{ env.REPOSITORY_NAME }}"
tags
:
|
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
-
name
:
Login to DockerHub
if
:
github.event_name != 'pull_request'
uses
:
docker/login-action@v2
with
:
username
:
${{ secrets.DOCKERHUB_USERNAME }}
password
:
${{ secrets.DOCKERHUB_TOKEN }}
-
name
:
Set up QEMU
uses
:
docker/setup-qemu-action@v2
-
name
:
Set up Docker Buildx
uses
:
docker/setup-buildx-action@v2
-
name
:
Build and push
uses
:
docker/build-push-action@v4
with
:
context
:
.
platforms
:
linux/amd64,linux/arm64/v8
push
:
${{ github.event_name != 'pull_request' }}
tags
:
${{ steps.meta.outputs.tags }}
labels
:
${{ steps.meta.outputs.labels }}
This diff is collapsed.
Click to expand it.
Dockerfile
+
4
−
35
View file @
12669e4b
ARG
BASE_CONTAINER=brunoe/jupyterutln-default:develop
FROM
$BASE_CONTAINER
FROM
brunoe/jupyter-base:develop
LABEL
maintainer="Emmanuel Bruno <emmanuel.bruno@univ-tln.fr>"
ENV
PLANTUML_VERSION 1.2022.12
ENV
PLANTUML_SHA1 da1de7f1b3de4c70b2ff501579802085dbc9a05b
USER
root
# Install minimal dependencies
...
...
@@ -12,25 +9,15 @@ RUN --mount=type=cache,target=/var/cache/apt \
rm
-f
/etc/apt/apt.conf.d/docker-clean
&&
\
apt-get update
&&
apt-get
install
-qq
--yes
--no-install-recommends
\
coreutils
\
curl
\
dnsutils
\
gnupg
\
graphviz
\
inkscape
\
iputils-ping
\
net-tools
\
pandoc
\
procps
\
tree
\
ttf-bitstream-vera
\
zsh
\
make latexmk fonts-freefont-otf texlive-latex-extra texlive-fonts-extra texlive-xetex latexmk
\
&&
rm
-rf
/var/lib/apt/lists/
*
## ZSH
ADD
zsh/initzsh.sh /tmp/initzsh.sh
ADD
zsh/p10k.zsh $HOME/.p10k.zsh
RUN
--mount
=
type
=
cache,target
=
/var/cache/buildkit/pip
\
echo
-e
"
\e
[93m**** Install Java Kernel for Jupyter ****
\e
[38;5;241m"
&&
\
curl
-sL
https://github.com/SpencerPark/IJava/releases/download/v1.3.0/ijava-1.3.0.zip
-o
/tmp/ijava-kernel.zip
&&
\
...
...
@@ -39,24 +26,6 @@ RUN --mount=type=cache,target=/var/cache/buildkit/pip \
python3 install.py
--sys-prefix
&&
\
# jupyter kernelspec install --user java/ &&
\
cd
&&
rm
-rf
/tmp/ijava-kernel /tmp/ijava-kernel.zip
&&
\
echo
-e
"
\e
[93m**** Install ZSH Kernel for Jupyter ****
\e
[38;5;241m"
&&
\
python3
-m
pip
install
zsh_jupyter_kernel
&&
\
python3
-m
zsh_jupyter_kernel.install
--sys-prefix
&&
\
echo
-e
"
\e
[93m**** Update Jupyter config ****
\e
[38;5;241m"
&&
\
mkdir
-p
$HOME
/jupyter_data
&&
\
jupyter lab
--generate-config
&&
\
sed
-i
-e
'/c.ServerApp.disable_check_xsrf =/ s/= .*/= True/'
\
-e
's/# \(c.ServerApp.disable_check_xsrf\)/\1/'
\
-e
'/c.ServerApp.data_dir =/ s/= .*/= "\/home\/jovyan\/jupyter_data"/'
\
-e
"/c.ServerApp.terminado_settings =/ s/= .*/= { 'shell_command': ['
\/
bin
\/
zsh'] }/"
\
-e
's/# \(c.ServerApp.terminado_settings\)/\1/'
\
$HOME
/.jupyter/jupyter_lab_config.py
&&
\
echo -e "\e[93m**** Configure a nice zsh environment ****\e[38;5;241m" && \
git clone --recursive https://github.com/sorin-ionescu/prezto.git "$HOME/.zprezto" && \
zsh -c /tmp/initzsh.sh && \
sed -i -e "s/zstyle ':prezto:module:prompt' theme 'sorin'/zstyle ':prezto:module:prompt' theme 'powerlevel10k'/" $HOME/.zpreztorc && \
echo "[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh" >> $HOME/.zshrc && \
echo "PATH=/opt/bin:$PATH" >> $HOME/.zshrc && \
fix-permissions
$CONDA_DIR
&&
\
fix-permissions /home/
$NB_USER
...
...
@@ -106,9 +75,9 @@ RUN echo '#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!' >> $HOME/.
SHELL
["/bin/zsh","-l","-c"]
# Install PlantUML
RUN
curl
-L
https://repo1.maven.org/maven2/net/sourceforge/plantuml/plantuml/
${
PLANTUML_VERSION
}
/plantuml-
${
PLANTUML_VERSION
}
.jar
-o
/usr/local/bin/plantuml.jar
&&
\
echo
"
$PLANTUML_SHA1
*/usr/local/bin/plantuml.jar"
|
sha1sum
-c
-
RUN
echo
-e
"
\e
[93m**** Install lombok and java dependencies ***
\e
[38;5;241m"
&&
\
mkdir
-p
"
${
HOME
}
/lib/"
&&
\
curl
-sL
https://projectlombok.org/downloads/lombok.jar
-o
"
${
HOME
}
/lib/lombok.jar"
COPY
dependencies/* "$HOME/lib/"
...
...
This diff is collapsed.
Click to expand it.
kernel.json
+
1
−
1
View file @
12669e4b
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment