Skip to content

Commit 7d91fb2

Browse files
authored
Merge pull request #54 from Chaste/docker-jupyterlab
Switch docker to jupyterlab
2 parents 0d6ad1e + 2cc7aaa commit 7d91fb2

File tree

5 files changed

+35
-22
lines changed

5 files changed

+35
-22
lines changed

.github/workflows/build-and-test.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ jobs:
1919

2020
steps:
2121
- name: checkout Chaste repository
22-
uses: actions/checkout@v3
22+
uses: actions/checkout@v4
2323
with:
2424
repository: Chaste/Chaste
2525
ref: develop
2626
path: Chaste
2727
submodules: recursive
2828

2929
- name: checkout PyChaste repository
30-
uses: actions/checkout@v3
30+
uses: actions/checkout@v4
3131
with:
3232
path: Chaste/projects/PyChaste
3333
submodules: recursive

.github/workflows/conda-build-linux.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ jobs:
1111

1212
steps:
1313
- name: checkout
14-
uses: actions/checkout@v3
14+
uses: actions/checkout@v4
1515

1616
- name: build conda package
1717
run: ./build-py310.sh
1818
working-directory: infra/conda/chaste
1919

2020
- name: upload conda package artifacts
21-
uses: actions/upload-artifact@v3
21+
uses: actions/upload-artifact@v4
2222
with:
2323
name: pychaste-conda
2424
path: infra/conda/chaste/build_artifacts/linux-64

.github/workflows/update-pychaste-tutorials.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
uses: actions/checkout@v4
2222

2323
- name: setup python
24-
uses: actions/setup-python@v4
24+
uses: actions/setup-python@v5
2525
with:
2626
python-version: '3.x'
2727

@@ -31,7 +31,7 @@ jobs:
3131
working-directory: infra
3232

3333
- name: upload archive files
34-
uses: actions/upload-artifact@v3
34+
uses: actions/upload-artifact@v4
3535
with:
3636
name: pychaste-tutorials-markdown
3737
path: doc/tutorials/*.md
@@ -45,7 +45,7 @@ jobs:
4545

4646
steps:
4747
- name: Download pychaste-tutorials-markdown
48-
uses: actions/download-artifact@v3
48+
uses: actions/download-artifact@v4
4949
with:
5050
name: pychaste-tutorials-markdown
5151

infra/docker/Dockerfile

+14-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
1+
# docker build -t pychaste .
2+
# docker run -it --init --rm -p 8888:8888 pychaste
3+
14
FROM mambaorg/micromamba:1.5-jammy
5+
LABEL maintainer="Kwabena N. Amponsah <[email protected]>" \
6+
author.orcid="https://orcid.org/0000-0002-7506-9040" \
7+
org.opencontainers.image.authors="Kwabena N. Amponsah" \
8+
org.opencontainers.image.url="https://github.com/Chaste/PyChaste" \
9+
org.opencontainers.image.licenses="3-Clause BSD" \
10+
org.opencontainers.image.title="PyChaste Docker Image" \
11+
org.opencontainers.image.description="PyChaste: Python Bindings for Chaste" \
12+
org.opencontainers.image.documentation="https://chaste.github.io/pychaste/"
213

314
USER root
415
RUN apt-get update && \
@@ -13,8 +24,9 @@ RUN apt-get update && \
1324
rm -rf /tmp/*
1425

1526
USER $MAMBA_USER
16-
RUN micromamba install -y -n base -c pychaste -c conda-forge -c bioconda chaste boost-cpp=1.74 notebook && \
27+
RUN micromamba install -y -n base -c pychaste -c conda-forge -c bioconda chaste boost-cpp=1.74 jupyterlab && \
1728
micromamba clean --all --yes && \
29+
rm -rf $HOME/micromamba/pkgs/* && \
1830
rm -rf /opt/conda/pkgs/*
1931

20-
CMD xvfb-run --server-args="-screen 0 1024x768x24" jupyter notebook --port=8888 --no-browser --ip=0.0.0.0
32+
CMD xvfb-run --server-args="-screen 0 1024x768x24" jupyter lab --port=8888 --no-browser --ip=0.0.0.0

infra/docker/README.md

+14-13
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,32 @@
11
# How to build the docker image
2+
The `pychaste` docker image is on the channel `chaste` on Docker Hub. This directory contains the Dockerfile for building the image. The guidance below assumes that [Docker](https://www.docker.com) has been installed. Docker commands may need to be prefixed with `sudo` depending on how Docker is set up on your system.
23

3-
The `pychaste` docker image is on the channel `chaste` on the Docker Hub. This directory contains the Dockerfile for building the image. Assuming [Docker](https://www.docker.com) is set up, it can be built by running:
4+
The image can be built by running:
45

56
```bash
6-
[sudo] docker build -t pychaste .
7+
docker build -t pychaste .
78
```
89

10+
## Working with the local image
11+
12+
```bash
13+
docker run -it --init --rm -p 8888:8888 pychaste
14+
```
15+
16+
Then go to [http://127.0.0.1:8888](http://127.0.0.1:8888) in a web browser.
17+
18+
## Uploading the image
919
If you are happy with the package it can be tagged and uploaded to Docker Hub.
1020
To find the image id, run:
1121

1222
```bash
13-
[sudo] docker images
23+
docker images
1424
```
1525

1626
To tag the image with the `latest` tag and upload it to Docker Hub:
1727

1828
```bash
19-
[sudo] docker tag <image_id> chaste/pychaste:latest
29+
docker tag <image_id> chaste/pychaste:latest
2030
docker login
2131
docker push chaste/pychaste:latest
2232
```
23-
24-
## Working with the local image
25-
26-
```bash
27-
[sudo] docker run --init -it -p 8888:8888 pychaste
28-
```
29-
30-
Then go to [http://localhost::8888](http://localhost::8888) in a web browser.
31-

0 commit comments

Comments
 (0)