rasbt-machine-learning-book
SUCCESS
6m 15s
History Source
SummaryIterations1Transcript3Dockerfile
Dockerfile26 lines · 854 chars
FROM continuumio/miniconda3:latest

# Build-time: cache environment creation by adding the env YAML first
# Ensure non-interaction during package installs
ENV DEBIAN_FRONTEND=noninteractive

WORKDIR /workspace

# Copy environment spec and create the Conda environment
COPY environment.yml /tmp/environment.yml
RUN conda update -n base -c defaults conda && \
    conda env create -f /tmp/environment.yml --prefix /opt/conda/envs/machine-learning-book && \
    conda clean -afy

# Add the newly created environment to PATH for ease of use
ENV PATH=/opt/conda/envs/machine-learning-book/bin:$PATH

# Copy the rest of the repository
COPY . /workspace

# Expose JupyterLab port so users can run notebooks from the container
EXPOSE 8888

# Default command: start JupyterLab
CMD ["jupyter", "lab", "--ip=0.0.0.0", "--port=8888", "--no-browser", "--allow-root"]