Skip to content

Commit

Permalink
working image for pymc-marketing pre installed env
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelraczycki committed Aug 5, 2023
1 parent 12b56e2 commit 309b2ab
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Start with the official Debian base image
FROM jupyter/minimal-notebook:latest
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

USER root

# Update the system and install necessary packages
RUN apt-get update && apt-get install -y \
curl \
bzip2 \
build-essential

# Set the working directory
WORKDIR /app

# Download and install Miniconda (ARM64 version)
RUN curl -LO https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-aarch64.sh
RUN bash Miniforge3-Linux-aarch64.sh -p /miniconda -b
RUN rm Miniforge3-Linux-aarch64.sh
ENV PATH=/miniconda/bin:${PATH}
RUN conda update -y conda

# Create a new Conda environment and install a package
RUN conda create -n pymc_marketing python=3.10 -y && \
conda init bash && \
echo "conda activate pymc_marketing" >> ~/.bashrc && \
/bin/bash -c ". /root/.bashrc; \
conda install -c conda-forge pymc-marketing ipykernel -y; \
python -m ipykernel install --user --name=pymc-marketing;"

# Create the directory with correct permissions
RUN mkdir -p /home/jovyan/.local/share/jupyter/runtime && \
chown -R jovyan:users /home/jovyan/.local/share/jupyter

# Switch back to jovyan user
USER jovyan

WORKDIR /home/jovyan/work

# Set the default command to start the notebook server
CMD ["start-notebook.sh", "--NotebookApp.token=''", "--NotebookApp.password=''", "--allow-root"]

0 comments on commit 309b2ab

Please sign in to comment.