-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from Chia-Network/python-updates
- Loading branch information
Showing
6 changed files
with
166 additions
and
44 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,29 @@ | ||
name: Build Rocky 8 Image | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'rocky8/*' | ||
- '.github/workflows/build-rocky8.yml' | ||
pull_request: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '30 12 * * 5' | ||
|
||
concurrency: | ||
# SHA is added to the end if on `main` to let all main workflows run | ||
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ github.ref == 'refs/heads/main' && github.sha || '' }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
uses: Chia-Network/actions/.github/workflows/docker-build.yaml@main | ||
with: | ||
docker-context: "./rocky8" | ||
dockerfile: "./rocky8/Dockerfile" | ||
dockerhub_imagename: "chianetwork/rocky8-builder" | ||
secrets: | ||
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | ||
DOCKERHUB_PAT: ${{ secrets.DOCKERHUB_PAT }} |
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
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,58 @@ | ||
FROM rockylinux:8 | ||
|
||
ENV PYENV_ROOT=/root/.pyenv | ||
ENV PATH="$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH" | ||
# Python needs to be able to find the proper sqlite3 install | ||
ENV LD_LIBRARY_PATH="/usr/lib64" | ||
ENV NVM_DIR="/root/.nvm" | ||
|
||
# General Deps | ||
RUN yum -y groupinstall "Development Tools" && \ | ||
yum -y install ca-certificates createrepo dnf epel-release git rpm-build squashfs-tools vim wget && \ | ||
# jq relies on epel | ||
yum -y install jq && \ | ||
yum clean all | ||
|
||
# Compile newer version of sqlite3 | ||
RUN cd ~ && \ | ||
wget -q https://sqlite.org/2022/sqlite-autoconf-3400100.tar.gz && \ | ||
tar -xzf sqlite-autoconf-3400100.tar.gz && \ | ||
cd sqlite-autoconf-3400100 && \ | ||
CFLAGS="-DSQLITE_MAX_VARIABLE_NUMBER=500000" ./configure --prefix=/usr && \ | ||
make && \ | ||
make install && \ | ||
cd ~ && \ | ||
rm -rf ~/sqlite-autoconf* | ||
|
||
# Compile newer version of python3 | ||
RUN yum -y install openssl openssl-devel zlib-devel bzip2 bzip2-devel readline-devel tk-devel libffi-devel xz-devel && \ | ||
cd ~ && \ | ||
# Set up pyenv \ | ||
git clone https://github.com/pyenv/pyenv.git ~/.pyenv && \ | ||
pyenv install 3.10 && \ | ||
pyenv global 3.10 && \ | ||
pip install --upgrade pip && \ | ||
pip install --no-cache-dir py3createtorrent awscli && \ | ||
python3 -c 'import sys; import sqlite3; sys.exit(sqlite3.sqlite_version != "3.40.1")' && \ | ||
yum clean all | ||
|
||
# Add nodejs | ||
RUN git clone https://github.com/nvm-sh/nvm.git "$NVM_DIR" && \ | ||
cd "$NVM_DIR" && \ | ||
git checkout `git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1)` && \ | ||
\. "$NVM_DIR/nvm.sh" && \ | ||
nvm install 18 && \ | ||
nvm alias default 18 && \ | ||
for nodebin in $NVM_DIR/versions/node/$(nvm current)/bin/*; do ln -s "$nodebin" /usr/bin/$(basename $nodebin); done | ||
|
||
# Add FPM | ||
RUN gpg2 --keyserver keyserver.ubuntu.com --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB && \ | ||
curl -sSL https://get.rvm.io | bash -s stable && \ | ||
/bin/bash -l -c ". /etc/profile.d/rvm.sh && rvm install ruby-3 && gem install fpm" && \ | ||
yum clean all | ||
|
||
# Add GitHub CLI | ||
RUN dnf -y update && \ | ||
dnf -y install 'dnf-command(config-manager)' && \ | ||
dnf -y config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo && \ | ||
dnf -y install gh |
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
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
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