Spaces:
Build error
Build error
File size: 2,203 Bytes
4519d66 176314d 4519d66 df20158 4519d66 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
#
# Python Jupyter notebooks for Artificial Intelligence (AI) / Machine Learning (ML) on Ubuntu 22.04 LTS
#
# Source: https://github.com/machine-learning-helpers/docker-python-jupyter/blob/master/ubuntu2204/Dockerfile
#
# References:
# * ML specific Dockerfile: https://github.com/machine-learning-helpers/docker-python-jupyter/tree/master/ubuntu2204
# * ML specific images on Docker Hub: https://hub.docker.com/repository/docker/infrahelpers/python-jupyter
# * C++/Python generic Dockerfile: https://github.com/cpp-projects-showcase/docker-images/tree/master/ubuntu2204
# * C++/Python generic images on Docker Hub: https://hub.docker.com/repository/docker/infrahelpers/cpppython
#
FROM infrahelpers/cpppython:ubuntu2204
LABEL authors="Denis Arnaud <denis.arnaud_github at m4x dot org>"
LABEL version="0.1"
# Configuration
ENV container docker
ENV HOME /home/build
ENV LANGUAGE en_US:en
ENV LANG en_US.UTF-8
ENV LC_ALL $LANG
# Create the top directories to host the notebook and data samples
USER root
RUN mkdir -p /notebook /data && chown build.build /notebook /data
# Switch to the `build` user
USER build
# Python
ENV PATH $HOME/.pyenv/bin:$HOME/.pyenv/shims:$PATH
# Download some sample notebooks and data sets
WORKDIR /notebook
RUN git clone https://github.com/machine-learning-helpers/induction-python.git .
WORKDIR /data
RUN git clone https://github.com/machine-learning-helpers/data-samples.git .
# The base directory is where the Jupyter notebook samples have been dowloaded.
# However, that directory may be overshadowed by the one the user running that
# Docker image may wish to mount instead.
# There is content (which can be overshadowed) in that directory just in case
# the user does not want to mount her/his own Jupyter notebooks.
# Same comment for the content of the /data directory.
VOLUME /notebook
WORKDIR /notebook
# Install the Python dependencies, including Jupyter
RUN pipenv install
# Tell Docker that about the Jupyter port
EXPOSE 10088
EXPOSE 1140
COPY requirements.txt .
COPY samsapp.py .
RUN pip install -r requirements.txt
RUN python samsapp.py &
# Launch Jupyter
CMD pipenv run jupyter lab --allow-root --no-browser --ip 0.0.0.0 --IdendityProvider.token=
|