-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: dev container for GH codespaces (#1070)
* added simple devcontainer setup * added simple devcontainer setup, fixes #1052 * added simple devcontainer setup, fixes #1052 * added info about codespaces * formatting * formatting * adapted labels and pkgs. * added workflow to build base image for condespaces * adapted devcontainer to use base image * adapted image name * installing git * bumped python version * using root to install apt pkgs * running only on releases * adapting name of codespace Co-authored-by: Jan <[email protected]> * added ref. link for Codespaces * removed trailing whitespace * Applying suggestions from code review Co-authored-by: Jan <[email protected]> * renaming pipeline --------- Co-authored-by: Jan <[email protected]> Co-authored-by: Jan Boelts <[email protected]>
- Loading branch information
1 parent
ea1cc20
commit a7e65c5
Showing
4 changed files
with
81 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM jupyter/base-notebook:python-3.11 | ||
LABEL org.opencontainers.image.source="https://github.com/sbi-dev/sbi" | ||
LABEL org.opencontainers.image.description="Image for a Docker Devcontainer for the sbi toolbox." | ||
LABEL org.opencontainers.image.licenses="Apache-2.0" | ||
|
||
# Install latest release of sbi instead of current main branch this is | ||
# intenationally as the codespace shall facilitate as an easy access for new | ||
# users to experience the toolkit rather than a development environment. | ||
USER root | ||
|
||
RUN apt update && apt install -y git | ||
|
||
RUN pip install \ | ||
sbi \ | ||
ipywidgets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"name": "Codespace for the SBI Toolkit.", | ||
|
||
"image": "ghcr.io/sbi-dev/sbi/base-image-codespaces:latest", | ||
|
||
"customizations": { | ||
"vscode": { | ||
"terminal": { | ||
"integrated.shell.linux": "/bin/bash" | ||
}, | ||
"extensions": [ | ||
"GitHub.copilot", | ||
"ms-python.python", | ||
"ms-toolsai.jupyter", | ||
"stkb.rewrap", | ||
"streetsidesoftware.code-spell-checker" | ||
] | ||
} | ||
}, | ||
|
||
// open the default port for jupyter notebook | ||
"forwardPorts": [8888] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Docker Image for sbi toolkit | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build_devcontainer_base: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Log in to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
file: .devcontainer/Dockerfile | ||
platforms: linux/amd64 | ||
push: true | ||
tags: ghcr.io/${{ github.repository }}/base-image-codespaces:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters