Files

54 lines
2.0 KiB
Docker

# Get additional info about the Dockerfile at https://docs.docker.com/reference/dockerfile/
FROM condaforge/miniforge3:latest
# Define the name of the environment
ARG ENV_NAME=idear_env
ENV ENV_NAME=idear_env
# Set the working directory
WORKDIR /idear
#RUN apt-get update && apt-get install -y cifs-utils
# Install Graphviz system binaries
RUN apt-get update && apt-get install -y \
graphviz \
&& rm -rf /var/lib/apt/lists/*
# Add this after WORKDIR /idear and before the conda install
RUN conda config --add channels conda-forge && \
conda config --set channel_priority strict
# Use mamba if available for faster installation
RUN conda install -y -n base -c conda-forge mamba && \
mamba create -y -n $ENV_NAME -c conda-forge python=3.11 \
jupyter jupyterlab numpy h5py pandas matplotlib plotly=5.24 scipy pip && \
conda clean --all -y && rm -rf /root/.cache/pip
# Activate the environment and install additional pip packages
RUN conda run -n $ENV_NAME pip install pybis==1.35 igor2 ipykernel sphinx dash dash-bootstrap-components
# Set the default environment when the container starts
ENV CONDA_DEFAULT_ENV=$ENV_NAME
ENV PATH=/opt/conda/envs/$ENV_NAME/bin:$PATH
# Create necessary directories for VOLUME
RUN mkdir -p /idear/data /idear/figures /idear/notebooks /idear/scripts
#RUN mkdir -p /mnt/lac_ord
# Copy project files, excluding certain directories (handled via .dockerignore)
COPY . /idear
# Copy and install dependencies from requirements.txt
COPY requirements.txt /idear/requirements.txt
RUN conda run -n $ENV_NAME pip install -r /idear/requirements.txt
# Define volumes for excluded directories
# VOLUME ["/idear/data", "/idear/figures", "/idear/notebooks", "/idear/scripts"]
# Add JupyterLab
RUN pip install graphviz
# If you want to set JupyterLab as the default command
#CMD ["jupyter", "lab", "--ip=0.0.0.0", "--port=8888", "--no-browser", "--allow-root", "--NotebookApp.token='my-token'"]
CMD ["/bin/bash"]