<commit_before># Docker image for a tmpnb server, used to teach the EE Python API
# v004

FROM jupyter/minimal

MAINTAINER <NAME> <<EMAIL>>

USER root

RUN mkdir /home/jovyan/communities && mkdir /home/jovyan/featured
ADD notebooks/ /home/jovyan/
#ADD datasets/ /home/jovyan/datasets/
RUN chown -R jovyan:jovyan /home/jovyan

EXPOSE 8888

USER jovyan
ENV HOME /home/jovyan
ENV SHELL /bin/bash
ENV USER jovyan
ENV PATH $CONDA_DIR/bin:$CONDA_DIR/envs/python2/bin:$PATH
WORKDIR $HOME

USER jovyan

# Python packages
#RUN conda install --yes numpy pandas scikit-learn scikit-image matplotlib scipy seaborn sympy cython patsy statsmodels cloudpickle dill numba bokeh && conda clean -yt

# Now for a python2 environment
RUN conda create -p $CONDA_DIR/envs/python2 python=2.7 ipython numpy pandas scikit-learn scikit-image matplotlib scipy seaborn sympy cython patsy statsmodels cloudpickle dill numba bokeh && conda clean -yt

# install the Earth Engine package and dependencies
RUN conda install -y -n python2 --channel bcbio oauth2client
RUN conda install -y -n python2 --channel tylerickson --channel pandas earthengine-api

RUN $CONDA_DIR/envs/python2/bin/python $CONDA_DIR/envs/python2/bin/ipython kernelspec install-self --user

# Extra Kernels
#RUN pip install --user bash_kernel

# Featured notebooks
#RUN git clone --depth 1 https://github.com/jvns/pandas-cookbook.git /home/jovyan/featured/pandas-cookbook/
RUN git clone --depth 1 https://github.com/ipython/ipython.git /home/jovyan/featured/ipython-examples/

# Convert notebooks to the current format
RUN find . -name '*.ipynb' -exec ipython nbconvert --to notebook {} --output {} \;
RUN find . -name '*.ipynb' -exec ipython trust {} \;

CMD ipython notebook<commit_msg>v006 revert python installs to examples from docker-demo-images<commit_after># Docker image for a tmpnb server, used to teach the EE Python API
# v006

FROM jupyter/minimal

MAINTAINER <NAME> <<EMAIL>>

USER root

RUN mkdir /home/jovyan/communities && mkdir /home/jovyan/featured
ADD notebooks/ /home/jovyan/
#ADD datasets/ /home/jovyan/datasets/
RUN chown -R jovyan:jovyan /home/jovyan

EXPOSE 8888

USER jovyan
ENV HOME /home/jovyan
ENV SHELL /bin/bash
ENV USER jovyan
ENV PATH $CONDA_DIR/bin:$CONDA_DIR/envs/python2/bin:$PATH
WORKDIR $HOME

USER jovyan

# Python packages
RUN conda install --yes numpy pandas scikit-learn scikit-image matplotlib scipy seaborn sympy cython patsy statsmodels cloudpickle dill numba bokeh && conda clean -yt

# Now for a python2 environment
RUN conda create -p $CONDA_DIR/envs/python2 python=2.7 ipython numpy pandas scikit-learn scikit-image matplotlib scipy seaborn sympy cython patsy statsmodels cloudpickle dill numba bokeh && conda clean -yt
#RUN conda create -p $CONDA_DIR/envs/python2 python=2.7 ipython numpy pandas matplotlib scipy && conda clean -yt

# install the Earth Engine package and dependencies
RUN conda install -y -n python2 --channel bcbio oauth2client
RUN conda install -y -n python2 --channel tylerickson --channel pandas earthengine-api

RUN $CONDA_DIR/envs/python2/bin/python $CONDA_DIR/envs/python2/bin/ipython kernelspec install-self --user

# Extra Kernels
RUN pip install --user bash_kernel

# Featured notebooks
#RUN git clone --depth 1 https://github.com/jvns/pandas-cookbook.git /home/jovyan/featured/pandas-cookbook/
#RUN git clone --depth 1 https://github.com/ipython/ipython.git /home/jovyan/featured/ipython-examples/

# Convert notebooks to the current format
RUN find . -name '*.ipynb' -exec ipython nbconvert --to notebook {} --output {} \;
RUN find . -name '*.ipynb' -exec ipython trust {} \;

CMD ipython notebook
{'fraction_non_alphanumeric': 0.09214167127836193, 'fraction_numerical': 0.012174875484228001, 'mean_word_length': 4.223988439306359, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2694272', 'n_tokens_mistral': 1317, 'n_tokens_neox': 1259, 'n_words': 408}