Skip to content

Commit

Permalink
Update user image base to hub-5.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
xcompass committed Nov 26, 2024
1 parent 56c1ee8 commit 8d3557c
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 14 deletions.
40 changes: 37 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,48 @@ on:
jobs:
build:
name: Build Image
runs-on: self-hosted
#runs-on: self-hosted
runs-on: ubuntu-latest
# These permissions are needed to interact with GitHub's OIDC Token endpoint.
permissions:
id-token: write
contents: read
steps:
steps:
- name: Check disk space
run: df . -h
- name: Free disk space
run: |
sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true
sudo rm -rf \
/usr/share/dotnet /usr/local/lib/android /opt/ghc \
/usr/local/share/powershell /usr/share/swift /usr/local/.ghcup \
/usr/lib/jvm || true
echo "some directories deleted"
sudo apt install aptitude -y >/dev/null 2>&1
sudo aptitude purge aria2 ansible azure-cli shellcheck rpm xorriso zsync \
esl-erlang firefox gfortran-8 gfortran-9 google-chrome-stable \
google-cloud-sdk imagemagick \
libmagickcore-dev libmagickwand-dev libmagic-dev ant ant-optional kubectl \
mercurial apt-transport-https mono-complete libmysqlclient \
unixodbc-dev yarn chrpath libssl-dev libxft-dev \
libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev \
snmp pollinate libpq-dev postgresql-client powershell ruby-full \
sphinxsearch subversion mongodb-org azure-cli microsoft-edge-stable \
-y -f >/dev/null 2>&1
sudo aptitude purge google-cloud-sdk -f -y >/dev/null 2>&1
sudo aptitude purge microsoft-edge-stable -f -y >/dev/null 2>&1 || true
sudo apt purge microsoft-edge-stable -f -y >/dev/null 2>&1 || true
sudo aptitude purge '~n ^mysql' -f -y >/dev/null 2>&1
sudo aptitude purge '~n ^php' -f -y >/dev/null 2>&1
sudo aptitude purge '~n ^dotnet' -f -y >/dev/null 2>&1
sudo apt-get autoremove -y >/dev/null 2>&1
sudo apt-get autoclean -y >/dev/null 2>&1
echo "some packages purged"
- name: Check disk space
run: df . -h

- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
Expand Down
22 changes: 11 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# sudo docker kill $(sudo docker ps -q); sudo docker rm $(sudo docker ps -a -q); sudo docker rmi $(sudo docker images -q)
# sudo docker build --squash --no-cache -t 032401129069.dkr.ecr.ca-central-1.amazonaws.com/jupyterhub:jupyterlab-open .

ARG BASE_CONTAINER=quay.io/jupyter/datascience-notebook:hub-4.1.5
ARG BASE_CONTAINER=quay.io/jupyter/datascience-notebook:hub-5.2.0
#ARG BASE_CONTAINER=032401129069.dkr.ecr.ca-central-1.amazonaws.com/jupyterhub:jupyterlab-all
FROM $BASE_CONTAINER

Expand All @@ -26,10 +26,11 @@ RUN apt-get update && \
zsh \
vim \
htop \
build-essential \
libcurl4-openssl-dev \
libssl-dev \
libxml2-dev \
# future version of base image will remove nodejs, uncomment below after upgrade
# npm \
gfortran && \
ldconfig && \
apt-get autoclean && \
Expand All @@ -41,11 +42,10 @@ USER ${NB_UID}
# Install Conda Packages (Plotly, SageMath)
RUN mamba create --yes -n sage sage python=3.11 && \
mamba install --yes -c conda-forge -c plotly \
"sage" \
"plotly" \
"jupyterlab-spellchecker" \
"dash" \
"xeus-cling" \
# "xeus-cling" \
"openjdk" \
"maven" \
"ipython-sql" \
Expand All @@ -61,20 +61,20 @@ RUN R -e 'require(devtools); \
# Install R packages
RUN mamba install --yes -c conda-forge \
'r-stargazer' \
'r-quanteda' \
'r-quanteda.textmodels' \
'r-quanteda.textplots' \
'r-quanteda.textstats' \
# 'r-quanteda' \
# 'r-quanteda.textmodels' \
# 'r-quanteda.textplots' \
# 'r-quanteda.textstats' \
'r-caret' \
'r-ggiraph' \
# 'r-ggiraph' \
'r-ggextra' \
'r-isocodes' \
'r-urltools' \
'r-ggthemes' \
'r-modelsummary' \
'r-nsyllable' \
'r-proxyc' \
'r-tidytext' \
# 'r-proxyc' \
# 'r-tidytext' \
'r-car' && \
mamba clean --all -f -y

Expand Down

0 comments on commit 8d3557c

Please sign in to comment.