-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
47982fa
commit d303a47
Showing
5 changed files
with
95 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,42 @@ | ||
name: Create and publish a Docker image | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
build-and-push-image: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
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,13 @@ | ||
FROM debian:bookworm-slim | ||
|
||
ADD build /build | ||
|
||
WORKDIR /build | ||
RUN bash dpkg.sh | ||
RUN bash rocm.sh | ||
RUN bash ipython.sh | ||
|
||
#RUN rm -rf /build | ||
|
||
WORKDIR /root | ||
CMD ["/usr/local/bin/ipython"] |
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,10 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
apt-get -qq update | ||
apt-get -qq install -y --no-install-recommends wget ca-certificates | ||
|
||
wget -qO /etc/apt/sources.list https://gist.githubusercontent.com/supersonictw/46f2da8114d620168c674fa8e104d1f0/raw/e4736ca846a1ebbc22ee47bc1d0676ced3604e0c/sources.debian.list | ||
apt-get -qq update | ||
apt-get -qq upgrade |
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,6 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
apt install -y --no-recommended python3 python3-pip python-is-python3 | ||
pip install ipython |
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,24 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
# install script dependencies | ||
apt-get -qq install build-essential cmake repo git | ||
|
||
# repo sync | ||
repo init -u https://github.com/RadeonOpenCompute/ROCm.git -b roc-5.7.x | ||
repo sync | ||
|
||
# prepare rocm-build | ||
git clone https://github.com/xuhuisheng/rocm-build.git --branch 59b87dc62972c1ad32a8862e9ea6b5921c1f33a0 | ||
cd rocm-build && source env.sh && sh install-dependency.sh | ||
|
||
# Array of script names matching the pattern [0-9][0-9].?????.sh | ||
scripts=($(ls -1v [0-9][0-9].*.sh)) | ||
|
||
# Loop through scripts and execute them | ||
for script in "${scripts[@]}"; do | ||
echo "Running script: $script" | ||
bash "$script" | ||
echo "----------------------------------------" | ||
done |