Skip to content

Commit

Permalink
feat: Add codespace configuration that installs apptainer (#11)
Browse files Browse the repository at this point in the history
* feat: Add codespace configuration

* build: Update to build from dockerfile for now

---------

Co-authored-by: Cordero Core <127983572+uwcdc@users.noreply.github.com>
  • Loading branch information
lsetiawan and uwcdc authored Oct 31, 2024
1 parent 248af5f commit d20d486
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 19 deletions.
25 changes: 25 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM golang:1.23.2-bullseye AS builder

RUN apt-get update && apt-get install -y \
build-essential \
uuid-dev \
libgpgme-dev \
squashfs-tools \
libseccomp-dev \
wget \
pkg-config \
git \
cryptsetup-bin

ARG APPTAINER_COMMITISH="main"
ARG MCONFIG_OPTIONS="--without-suid"
WORKDIR $GOPATH/src/github.com/apptainer
RUN git clone https://github.com/apptainer/apptainer.git \
&& cd apptainer \
&& git checkout "$APPTAINER_COMMITISH" \
&& ./mconfig $MCONFIG_OPTIONS -p /opt/apptainer \
&& cd builddir \
&& make \
&& make install

RUN ln -s /opt/apptainer/bin/apptainer /usr/local/bin/apptainer
40 changes: 21 additions & 19 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
{
"image":"ghcr.io/uw-ssec/coaching-companion:latest",

"customizations": {
"vscode": {
"extensions": [
"ms-toolsai.jupyter",
"ms-python.python",
"REditorSupport.r"
]
}
},
"hostRequirements": {
"cpus": 2,
"memory": "8gb",
"storage": "32gb"
},
"postCreateCommand":
"sh .devcontainer/postBuild.sh"
}
"build": {
"dockerfile": "Dockerfile",
"context": ".."
},
"customizations": {
"vscode": {
"extensions": [
"ms-toolsai.jupyter",
"ms-python.python",
"REditorSupport.r"
]
}
},
"hostRequirements": {
"cpus": 4,
"memory": "16gb",
"storage": "32gb"
},
"postCreateCommand":
"sh .devcontainer/postBuild.sh"
}

0 comments on commit d20d486

Please sign in to comment.