/
Dockerfile
43 lines (35 loc) · 1.66 KB
/
Dockerfile
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
FROM ubuntu:bionic
ENV JUPYTERLAB_VERSION 1.1.0
ENV USER_BINDER jovyan
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive && echo "America/Mexico_City" > /etc/timezone && apt-get install -y tzdata
RUN apt-get update && apt-get install -y \
build-essential \
sudo \
nano \
less \
git \
python3-dev \
python3-pip \
python3-setuptools \
nodejs && pip3 install --upgrade pip
#Clona el repositorio
RUN git clone https://github.com/optimizacion-2-2021-1-gh-classroom/practica-1-segunda-parte-yefovar.git
#Instala paquetes necesario
RUN pip install Cython
RUN apt-get install -y libopenblas-dev
#RUN cd practica-1-segunda-parte-yefovar/src/
#RUN python3 setup.py build_ext --inplace
RUN pip install -q git+"git://github.com/optimizacion-2-2021-1-gh-classroom/practica-1-segunda-parte-yefovar.git#subdirectory=src"
COPY requirements.txt .
RUN pip3 install -r requirements.txt
RUN pip install numpy==1.19.3 --no-binary numpy --force-reinstall
RUN groupadd ${USER_BINDER}
RUN useradd ${USER_BINDER} -g ${USER_BINDER} -m -s /bin/bash
RUN echo 'jovyan ALL=(ALL:ALL) NOPASSWD:ALL' | (EDITOR='tee -a' visudo)
RUN echo 'jovyan:qwerty' | chpasswd
RUN pip3 install jupyter jupyterlab==$JUPYTERLAB_VERSION --upgrade
RUN chown -R ${USER_BINDER}:${USER_BINDER} /home/jovyan/ #da permisos al usuario
USER ${USER_BINDER}
RUN jupyter notebook --generate-config && sed -i "s/#c.NotebookApp.password = .*/c.NotebookApp.password = u'sha1:115e429a919f:21911277af52f3e7a8b59380804140d9ef3e2380'/" /home/jovyan/.jupyter/jupyter_notebook_config.py
ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8