-
-
Notifications
You must be signed in to change notification settings - Fork 0
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 #4 from QuantEcon/pub-ga
PUBLISH to GitHub Container Registry
- Loading branch information
Showing
4 changed files
with
223 additions
and
119 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,130 @@ | ||
name: Build and Push Docker Containers | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
push_to_registry: | ||
name: Push Docker image to Docker Hub | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
# - name: Build & Push (py39-anaconda-2022-10-jb-0.12.1) | ||
# uses: docker/[email protected] | ||
# with: | ||
# context: py39-anaconda-2022-10-jb-0.12.1 | ||
# push: true | ||
# tags: mmcky/quantecon-lecture-python:py39-anaconda-2022-10-jb-0.12.1 | ||
|
||
# - name: Build & Push (py39-anaconda-2022-10-jb-0.15.1) | ||
# uses: docker/[email protected] | ||
# with: | ||
# context: py39-anaconda-2022-10-jb-0.15.1 | ||
# push: true | ||
# tags: mmcky/quantecon-lecture-python:py39-anaconda-2022-10-jb-0.15.1 | ||
|
||
# - name: Build & Push (cuda-12.1.0-anaconda-2023-03-py310) | ||
# uses: docker/[email protected] | ||
# with: | ||
# context: cuda-12.1.0-anaconda-2023-03-py310 | ||
# push: true | ||
# tags: mmcky/quantecon-lecture-python:cuda-12.1.0-anaconda-2023-03-py310 | ||
|
||
# # Upgrade quantecon-book-theme==0.5.0 | ||
# - name: Build & Push (cuda-12.1.0-anaconda-2023-03-py310-b) | ||
# uses: docker/[email protected] | ||
# with: | ||
# context: cuda-12.1.0-anaconda-2023-03-py310-b | ||
# push: true | ||
# tags: mmcky/quantecon-lecture-python:cuda-12.1.0-anaconda-2023-03-py310-b | ||
|
||
# Upgrade quantecon-book-theme==0.5.1 | ||
# - name: Build & Push (cuda-12.1.0-anaconda-2023-03-py310-c) | ||
# uses: docker/[email protected] | ||
# with: | ||
# context: cuda-12.1.0-anaconda-2023-03-py310-c | ||
# push: true | ||
# tags: mmcky/quantecon-lecture-python:cuda-12.1.0-anaconda-2023-03-py310-c | ||
|
||
- name: Create more disk space | ||
run: sudo rm -rf /usr/share/dotnet && sudo rm -rf /opt/ghc && sudo rm -rf "/usr/local/share/boost" && sudo rm -rf "$AGENT_TOOLSDIRECTORY" | ||
|
||
# # Upgrade quantecon-book-theme==0.5.3 | ||
# - name: Build & Push (cuda-12.1.0-anaconda-2023-03-py310-d) | ||
# uses: docker/[email protected] | ||
# with: | ||
# context: cuda-12.1.0-anaconda-2023-03-py310-d | ||
# push: true | ||
# tags: mmcky/quantecon-lecture-python:cuda-12.1.0-anaconda-2023-03-py310-d | ||
|
||
# - name: Build & Push (cuda-12.1.0-anaconda-2023-07-py310) | ||
# uses: docker/[email protected] | ||
# with: | ||
# context: cuda-12.1.0-anaconda-2023-07-py310 | ||
# push: true | ||
# tags: mmcky/quantecon-lecture-python:cuda-12.1.0-anaconda-2023-07-py310 | ||
|
||
# - name: Build & Push (cuda-12.1.0-anaconda-2023-07-py310-b) | ||
# uses: docker/[email protected] | ||
# with: | ||
# context: cuda-12.1.0-anaconda-2023-07-py310-b | ||
# push: true | ||
# tags: mmcky/quantecon-lecture-python:cuda-12.1.0-anaconda-2023-07-py310-b | ||
|
||
# - name: Build & Push (cuda-12.1.0-anaconda-2023-09-py311) | ||
# uses: docker/[email protected] | ||
# with: | ||
# context: cuda-12.1.0-anaconda-2023-09-py311 | ||
# push: true | ||
# tags: mmcky/quantecon-lecture-python:cuda-12.1.0-anaconda-2023-09-py311 | ||
|
||
# - name: Build & Push (cuda-12.1.0-anaconda-2023-09-py311-b) | ||
# uses: docker/[email protected] | ||
# with: | ||
# context: cuda-12.1.0-anaconda-2023-09-py311-b | ||
# push: true | ||
# tags: mmcky/quantecon-lecture-python:cuda-12.1.0-anaconda-2023-09-py311-b | ||
|
||
# - name: Build & Push (cuda-12.1.0-anaconda-2023-09-py311-c) | ||
# uses: docker/[email protected] | ||
# with: | ||
# context: cuda-12.1.0-anaconda-2023-09-py311-c | ||
# push: true | ||
# tags: mmcky/quantecon-lecture-python:cuda-12.1.0-anaconda-2023-09-py311-c | ||
|
||
# - name: Build & Push (cuda-12.1.0-anaconda-2023-09-py311-d) | ||
# uses: docker/[email protected] | ||
# with: | ||
# context: cuda-12.1.0-anaconda-2023-09-py311-d | ||
# push: true | ||
# tags: mmcky/quantecon-lecture-python:cuda-12.1.0-anaconda-2023-09-py311-d | ||
|
||
# - name: Build & Push (cuda-12.3.1-anaconda-2023-09-py311) | ||
# uses: docker/[email protected] | ||
# with: | ||
# context: cuda-12.3.1-anaconda-2023-09-py311 | ||
# push: true | ||
# tags: mmcky/quantecon-lecture-python:cuda-12.3.1-anaconda-2023-09-py311 | ||
|
||
- name: Build & Push (cuda-12.3.1-anaconda-2024-02-py311) | ||
uses: docker/[email protected] | ||
with: | ||
context: cuda-12.3.1-anaconda-2024-02-py311 | ||
push: true | ||
tags: mmcky/quantecon-lecture-python:cuda-12.3.1-anaconda-2024-02-py311 | ||
|
||
# - name: Build & Push (cuda-12.1.0-anaconda-2024-02-py311) | ||
# uses: docker/[email protected] | ||
# with: | ||
# context: cuda-12.1.0-anaconda-2024-02-py311 | ||
# push: true | ||
# tags: mmcky/quantecon-lecture-python:cuda-12.1.0-anaconda-2024-02-py311 |
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 |
---|---|---|
@@ -1,130 +1,31 @@ | ||
name: Build and Push Docker Containers | ||
name: Build and Push Docker Containers to GitHub Container Registry | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
|
||
env: | ||
IMAGE_NAME: lecture-python-container | ||
TAG: cuda-12.5.0-anaconda-2024-02-py311 | ||
|
||
jobs: | ||
push_to_registry: | ||
name: Push Docker image to Docker Hub | ||
name: Push Docker image to GitHub Containers | ||
permissions: | ||
packages: write | ||
contents: read | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
# - name: Build & Push (py39-anaconda-2022-10-jb-0.12.1) | ||
# uses: docker/[email protected] | ||
# with: | ||
# context: py39-anaconda-2022-10-jb-0.12.1 | ||
# push: true | ||
# tags: mmcky/quantecon-lecture-python:py39-anaconda-2022-10-jb-0.12.1 | ||
|
||
# - name: Build & Push (py39-anaconda-2022-10-jb-0.15.1) | ||
# uses: docker/[email protected] | ||
# with: | ||
# context: py39-anaconda-2022-10-jb-0.15.1 | ||
# push: true | ||
# tags: mmcky/quantecon-lecture-python:py39-anaconda-2022-10-jb-0.15.1 | ||
|
||
# - name: Build & Push (cuda-12.1.0-anaconda-2023-03-py310) | ||
# uses: docker/[email protected] | ||
# with: | ||
# context: cuda-12.1.0-anaconda-2023-03-py310 | ||
# push: true | ||
# tags: mmcky/quantecon-lecture-python:cuda-12.1.0-anaconda-2023-03-py310 | ||
|
||
# # Upgrade quantecon-book-theme==0.5.0 | ||
# - name: Build & Push (cuda-12.1.0-anaconda-2023-03-py310-b) | ||
# uses: docker/[email protected] | ||
# with: | ||
# context: cuda-12.1.0-anaconda-2023-03-py310-b | ||
# push: true | ||
# tags: mmcky/quantecon-lecture-python:cuda-12.1.0-anaconda-2023-03-py310-b | ||
|
||
# Upgrade quantecon-book-theme==0.5.1 | ||
# - name: Build & Push (cuda-12.1.0-anaconda-2023-03-py310-c) | ||
# uses: docker/[email protected] | ||
# with: | ||
# context: cuda-12.1.0-anaconda-2023-03-py310-c | ||
# push: true | ||
# tags: mmcky/quantecon-lecture-python:cuda-12.1.0-anaconda-2023-03-py310-c | ||
|
||
- name: Create more disk space | ||
uses: actions/checkout@v4 | ||
- name: Create more disk space on Ubuntu | ||
run: sudo rm -rf /usr/share/dotnet && sudo rm -rf /opt/ghc && sudo rm -rf "/usr/local/share/boost" && sudo rm -rf "$AGENT_TOOLSDIRECTORY" | ||
|
||
# # Upgrade quantecon-book-theme==0.5.3 | ||
# - name: Build & Push (cuda-12.1.0-anaconda-2023-03-py310-d) | ||
# uses: docker/[email protected] | ||
# with: | ||
# context: cuda-12.1.0-anaconda-2023-03-py310-d | ||
# push: true | ||
# tags: mmcky/quantecon-lecture-python:cuda-12.1.0-anaconda-2023-03-py310-d | ||
|
||
# - name: Build & Push (cuda-12.1.0-anaconda-2023-07-py310) | ||
# uses: docker/[email protected] | ||
# with: | ||
# context: cuda-12.1.0-anaconda-2023-07-py310 | ||
# push: true | ||
# tags: mmcky/quantecon-lecture-python:cuda-12.1.0-anaconda-2023-07-py310 | ||
|
||
# - name: Build & Push (cuda-12.1.0-anaconda-2023-07-py310-b) | ||
# uses: docker/[email protected] | ||
# with: | ||
# context: cuda-12.1.0-anaconda-2023-07-py310-b | ||
# push: true | ||
# tags: mmcky/quantecon-lecture-python:cuda-12.1.0-anaconda-2023-07-py310-b | ||
|
||
# - name: Build & Push (cuda-12.1.0-anaconda-2023-09-py311) | ||
# uses: docker/[email protected] | ||
# with: | ||
# context: cuda-12.1.0-anaconda-2023-09-py311 | ||
# push: true | ||
# tags: mmcky/quantecon-lecture-python:cuda-12.1.0-anaconda-2023-09-py311 | ||
|
||
# - name: Build & Push (cuda-12.1.0-anaconda-2023-09-py311-b) | ||
# uses: docker/[email protected] | ||
# with: | ||
# context: cuda-12.1.0-anaconda-2023-09-py311-b | ||
# push: true | ||
# tags: mmcky/quantecon-lecture-python:cuda-12.1.0-anaconda-2023-09-py311-b | ||
|
||
# - name: Build & Push (cuda-12.1.0-anaconda-2023-09-py311-c) | ||
# uses: docker/[email protected] | ||
# with: | ||
# context: cuda-12.1.0-anaconda-2023-09-py311-c | ||
# push: true | ||
# tags: mmcky/quantecon-lecture-python:cuda-12.1.0-anaconda-2023-09-py311-c | ||
|
||
# - name: Build & Push (cuda-12.1.0-anaconda-2023-09-py311-d) | ||
# uses: docker/[email protected] | ||
# with: | ||
# context: cuda-12.1.0-anaconda-2023-09-py311-d | ||
# push: true | ||
# tags: mmcky/quantecon-lecture-python:cuda-12.1.0-anaconda-2023-09-py311-d | ||
|
||
# - name: Build & Push (cuda-12.3.1-anaconda-2023-09-py311) | ||
# uses: docker/[email protected] | ||
# with: | ||
# context: cuda-12.3.1-anaconda-2023-09-py311 | ||
# push: true | ||
# tags: mmcky/quantecon-lecture-python:cuda-12.3.1-anaconda-2023-09-py311 | ||
|
||
- name: Build & Push (cuda-12.3.1-anaconda-2024-02-py311) | ||
uses: docker/[email protected] | ||
with: | ||
context: cuda-12.3.1-anaconda-2024-02-py311 | ||
push: true | ||
tags: mmcky/quantecon-lecture-python:cuda-12.3.1-anaconda-2024-02-py311 | ||
|
||
# - name: Build & Push (cuda-12.1.0-anaconda-2024-02-py311) | ||
# uses: docker/[email protected] | ||
# with: | ||
# context: cuda-12.1.0-anaconda-2024-02-py311 | ||
# push: true | ||
# tags: mmcky/quantecon-lecture-python:cuda-12.1.0-anaconda-2024-02-py311 | ||
- name: Build image | ||
run: | | ||
cd ${{ env.TAG }} | ||
docker build -t ghcr.io/quantecon/${{ env.IMAGE_NAME }}:${{ env.TAG }} . | ||
- name: Log in to registr y | ||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | ||
- name: Build & Push Container | ||
run: | | ||
docker push ghcr.io/quantecon/${{ env.IMAGE_NAME }}:${{ env.TAG }} |
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,47 @@ | ||
FROM nvidia/cuda:12.5.0-devel-ubuntu22.04 | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections | ||
|
||
# Install base utilities | ||
RUN apt-get update && \ | ||
apt-get install -y sudo | ||
|
||
# Install tzdata | ||
# ENV TZ=Etc/UTC | ||
# RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||
RUN apt-get install -y tzdata | ||
|
||
# Install developer tools | ||
RUN apt-get install -y build-essential && \ | ||
apt-get install -y wget && \ | ||
apt-get install -y git | ||
|
||
# Install LaTeX build system | ||
RUN apt-get install -y texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended texlive-fonts-extra texlive-xetex latexmk xindy dvipng ghostscript cm-super | ||
|
||
# Clean apt | ||
RUN sudo apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Install miniconda | ||
ENV CONDA_DIR /opt/conda | ||
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \ | ||
/bin/bash ~/miniconda.sh -b -p /opt/conda | ||
RUN rm -rf Miniconda3-latest-Linux-x86_64.sh | ||
|
||
# Put conda in path so we can use conda activate | ||
ENV PATH=$CONDA_DIR/bin:$PATH | ||
|
||
# Setup Environment | ||
COPY environment.yml . | ||
RUN conda env create -f environment.yml | ||
RUN echo "source activate quantecon" > ~/.bashrc | ||
ENV PATH /opt/conda/envs/quantecon/bin:$PATH | ||
ENV CONDA_DEFAULT_ENV quantecon | ||
|
||
# Install JAX | ||
RUN nvcc --version | ||
RUN pip install "numpyro[cuda]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html | ||
# Note: always install jax[cuda] last to ensure proper CUDA+CUDANN version linking | ||
RUN pip install --upgrade "jax[cuda12_pip]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html |
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,26 @@ | ||
name: quantecon | ||
channels: | ||
- default | ||
dependencies: | ||
- python=3.11 | ||
- anaconda=2024.02 | ||
- pip | ||
- pip: | ||
- jupyter-book==0.15.1 | ||
- quantecon-book-theme==0.7.1 | ||
- sphinx-tojupyter==0.3.0 | ||
- sphinxext-rediraffe==0.2.7 | ||
- sphinx-reredirects==0.1.3 | ||
- sphinx-exercise==0.4.1 | ||
- ghp-import==1.1.0 | ||
- sphinxcontrib-youtube==1.1.0 | ||
- sphinx-togglebutton==0.3.1 | ||
- array-to-latex | ||
- prettytable | ||
- kaleido | ||
- arviz | ||
# Docker Requirements | ||
- pytz | ||
# Docutils Issue (https://github.com/mcmtroffaes/sphinxcontrib-bibtex/issues/322) | ||
- docutils==0.17.1 | ||
|