-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add apptainer def file and workflow to build it
- Loading branch information
1 parent
58b8feb
commit e092818
Showing
2 changed files
with
46 additions
and
0 deletions.
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,30 @@ | ||
name: Build container image | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
|
||
jobs: | ||
build: | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install dependencies | ||
run: | | ||
sudo apt update -y | ||
sudo apt install -y wget | ||
- name: Install Apptainer | ||
run: | | ||
wget https://github.com/apptainer/apptainer/releases/download/v1.2.4/apptainer_1.2.4_amd64.deb | ||
sudo apt install -y ./apptainer_1.2.4_amd64.deb | ||
rm ./apptainer_1.2.4_amd64.deb | ||
- uses: actions/checkout@v4 | ||
- name: Build container | ||
run: sudo apptainer build ML102.sif ML102.def | ||
- name: Login and deploy | ||
run: | | ||
echo ${{ secrets.GITHUB_TOKEN }} | apptainer remote login -u ${{ secrets.GHCR_USERNAME }} --password-stdin oras://ghcr.io | ||
apptainer push ML102.sif "oras://ghcr.io/ml102_workshop:latest" | ||
if: ${{ github.ref == 'refs/heads/main' }} |
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,16 @@ | ||
Bootstrap: docker | ||
From: python:3.11-bookworm | ||
|
||
%files | ||
./ /opt/ml102_workshop/ | ||
|
||
%post | ||
apt-get update && apt-get install -y \ | ||
rsync \ | ||
nano \ | ||
vim \ | ||
git \ | ||
wget \ | ||
curl | ||
pip install -r /opt/ml102_workshop/requirements.lock.txt | ||
pip install jupyterlab |