Skip to content
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

Initial jupyterlab updates #359

Open
wants to merge 12 commits into
base: development
Choose a base branch
from
4 changes: 2 additions & 2 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Docker Image Build & Run

on:
push:
branches: [ master, dev*, test* ]
branches: [ master, dev*, experimental, test* ]
pull_request:
branches: [ master, dev*, test* ]
branches: [ master, dev*, experimental, test* ]

jobs:

Expand Down
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ RUN sudo update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 10
################################################################################
######## Install NEURON simulator

RUN pip3 install neuron==8.0.1
RUN sudo pip3 install neuron==8.1.0


################################################################################
Expand Down Expand Up @@ -123,3 +123,5 @@ RUN echo '\n\nalias cd..="cd .."\nalias h=history\nalias ll="ls -alt"' >> ~/.bas
RUN pip list

RUN echo "Built the OpenWorm Docker image!"

RUN python3 -m pip install --no-cache-dir notebook jupyterlab
12 changes: 11 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
#!/bin/bash

version=$(<VERSION) # Read version of Dockerfile from file VERSION
docker build "$@" -t "openworm/openworm:$version" .

# Set the platform flag if we're on ARM
arch=$(uname -m)
if [[ "$arch" == "arm64" || "$arch" == "aarch64" ]]; then
platform_flag="--platform linux/amd64"
else
platform_flag=""
fi

# Build the Docker image
docker build $platform_flag "$@" -t "openworm/openworm:$version" .
12 changes: 11 additions & 1 deletion rebuild.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
#!/bin/bash

version=$(<VERSION) # Read version of Dockerfile from file VERSION
docker build "$@" -t "openworm/openworm:$version" --no-cache .

# Set the platform flag if we're on ARM
arch=$(uname -m)
if [[ "$arch" == "arm64" || "$arch" == "aarch64" ]]; then
platform_flag="--platform linux/amd64"
else
platform_flag=""
fi

# Rebuild the Docker image
docker build $platform_flag "$@" -t "openworm/openworm:$version" --no-cache .
5 changes: 5 additions & 0 deletions run-jl.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

version=$(<VERSION) # Read version of Dockerfile from file VERSION

docker run -it --rm -p 8888:8888 "openworm/openworm:$version" jupyter lab --NotebookApp.default_url=/lab/ --ip=0.0.0.0 --port=8888 --allow-root