-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
working image for pymc-marketing pre installed env
- Loading branch information
1 parent
12b56e2
commit 309b2ab
Showing
1 changed file
with
41 additions
and
0 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,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"] |