diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f022842..c2758dd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,7 +6,7 @@ on: env: IMAGE_NAME: lecture-python-container - TAG: cuda-12.6.0-anaconda-2024-06-py311 + TAG: cuda-12.6.0-anaconda-2024-06-py312 jobs: push_to_registry: diff --git a/cuda-12.6.0-anaconda-2024-06-py312/Dockerfile b/cuda-12.6.0-anaconda-2024-06-py312/Dockerfile new file mode 100644 index 0000000..ff4fb87 --- /dev/null +++ b/cuda-12.6.0-anaconda-2024-06-py312/Dockerfile @@ -0,0 +1,47 @@ +FROM nvidia/cuda:12.6.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 diff --git a/cuda-12.6.0-anaconda-2024-06-py312/environment.yml b/cuda-12.6.0-anaconda-2024-06-py312/environment.yml new file mode 100644 index 0000000..2a0111a --- /dev/null +++ b/cuda-12.6.0-anaconda-2024-06-py312/environment.yml @@ -0,0 +1,27 @@ +name: quantecon +channels: + - default +dependencies: + - python=3.12 + - anaconda=2024.06 + - pip + - pip: + - jupyter-book==0.15.1 + - quantecon-book-theme==0.7.2 + - sphinx-tojupyter==0.3.0 + - sphinxext-rediraffe==0.2.7 + - sphinx-reredirects==0.1.3 + - sphinx-exercise==0.4.1 + - sphinx-proof==0.2.0 + - 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 +