diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a2ff685..6c1b33d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,7 +5,7 @@ on: branches: - 'main' schedule: - - cron: '12 3 5 * *' #At 03:12 on day-of-month 5 + - cron: '15 3 5 * *' #At 03:15 on day-of-month 5 jobs: build: diff --git a/Dockerfile b/Dockerfile index f502922..992204c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,7 @@ FROM quay.io/jupyter/minimal-notebook ARG CONDA_ENV_NAME=cling +ARG python_version=3.8 # Switch to root user USER root @@ -10,23 +11,17 @@ RUN apt-get update && apt-get install -y \ build-essential # Create and activate conda environment -RUN conda create -n $CONDA_ENV_NAME python=3.8 && \ +RUN conda create -n $CONDA_ENV_NAME python=$python_version && \ echo "conda activate $CONDA_ENV_NAME" >> /etc/profile.d/conda.sh && \ conda init && \ exec bash -# Install xeus-cling and its dependencies +# Install xeus-cling and its dependencies && Install the Kernel Spec RUN /bin/bash -c "source activate $CONDA_ENV_NAME && \ - mamba install xeus-cling -c conda-forge --yes" - -# Switch back to non-root user -# USER $NB_UID - -#Install the Kernel Spec -RUN /bin/bash -c "source activate $CONDA_ENV_NAME && \ - jupyter kernelspec install /opt/conda/envs/cling/share/jupyter/kernels/xcpp11 --sys-prefix && \ - jupyter kernelspec install /opt/conda/envs/cling/share/jupyter/kernels/xcpp14 --sys-prefix && \ - jupyter kernelspec install /opt/conda/envs/cling/share/jupyter/kernels/xcpp17 --sys-prefix" + mamba install xeus-cling -c conda-forge --yes && \ + jupyter kernelspec install /opt/conda/envs/cling/share/jupyter/kernels/xcpp11 --sys-prefix && \ + jupyter kernelspec install /opt/conda/envs/cling/share/jupyter/kernels/xcpp14 --sys-prefix && \ + jupyter kernelspec install /opt/conda/envs/cling/share/jupyter/kernels/xcpp17 --sys-prefix" # Set the default command to start Jupyter Notebook CMD ["jupyter", "notebook", "--ip=0.0.0.0", "--port=8888", "--no-browser", "--allow-root"] diff --git a/README.md b/README.md index a936250..6ce4fa3 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ This repository provides a Dockerfile for running [cling](https://github.com/roo To pull the Docker image, use the following command: ```bash - docker pull p01arn0va/cling-jupyter +docker pull p01arn0va/cling-jupyter ``` Here is an example of how to run the Docker image: @@ -18,7 +18,7 @@ docker run -it --rm -p8888:8888 -v $PWD:/home/jovyan/work p01arn0va/cling-jupyte ### Building the Docker Image -To build the Docker image locally, run the following command in the repository’s root directory: +To build the Docker image locally, run the following command in the repository's root directory: ```bash docker build -t cling-jupyter .