Skip to content

Commit

Permalink
Add git-lfs to JupyterLab base image (#112)
Browse files Browse the repository at this point in the history
* Include git-lfs as part of base install

* mv 'set -xe' to starting point

* Move git-lfs installation after shell init

* test basic dep. inclusion

* Update permission on executable
  • Loading branch information
viniciusdc authored Jan 18, 2024
1 parent b7febed commit 1be561c
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Dockerfile.jupyterlab
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ COPY jupyterlab/apt.txt /opt/jupyterlab/apt.txt
COPY scripts/install-apt.sh /opt/scripts/install-apt.sh
RUN /opt/scripts/install-apt.sh /opt/jupyterlab/apt.txt

# Install extra packages (require custom package repository)
COPY scripts/install-gitlfs.sh /opt/scripts/install-gitlfs.sh
RUN /opt/scripts/install-gitlfs.sh

ARG SKIP_CONDA_SOLVE=no
COPY scripts/install-conda-environment.sh /opt/scripts/install-conda-environment.sh
COPY jupyterlab/environment.yaml /opt/jupyterlab/environment.yaml
Expand Down
5 changes: 4 additions & 1 deletion jupyterlab/apt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,7 @@ libosmesa6

# gpg
gnupg
pinentry-curses
pinentry-curses

# extras
git-lfs
20 changes: 20 additions & 0 deletions scripts/install-gitlfs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
# Copyright (c) Nebari Development Team.
# Distributed under the terms of the Modified BSD License.

set -xe

# Adding the packagecloud repository for git-lfs installation
wget --quiet -O script.deb.sh https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh
expected_sum=5fc673f9a72b94c011b13eb5caedc3aa4541b5c5506b95d013cb7ba0f1cf66cf

if [[ ! $(sha256sum script.deb.sh) == "${expected_sum} script.deb.sh" ]]; then
echo Unexpected hash from git-lfs install script
exit 1
fi

# Install packagecloud's repository signing key and add repository to apt
bash ./script.deb.sh

# Install git-lfs
apt-get install -y --no-install-recommends git-lfs

0 comments on commit 1be561c

Please sign in to comment.