|
FROM jupyter/scipy-notebook |
|
|
|
|
|
WORKDIR /app |
|
|
|
|
|
COPY requirements.txt . |
|
|
|
|
|
COPY public /app/public |
|
|
|
|
|
USER root |
|
|
|
|
|
RUN apt-get update && apt-get install -y wget nginx && pip install -r requirements.txt |
|
|
|
|
|
COPY jupyter_config.py /etc/jupyter/jupyter_config.py |
|
COPY nginx.conf /etc/nginx/nginx.conf |
|
COPY entrypoint.sh /app/entrypoint.sh |
|
|
|
|
|
RUN chmod +x /app/entrypoint.sh |
|
|
|
|
|
RUN mkdir -p /var/lib/nginx/body /var/lib/nginx/fastcgi \ |
|
/var/lib/nginx/proxy /var/lib/nginx/scgi \ |
|
/var/lib/nginx/uwsgi /var/log/nginx \ |
|
&& chown -R ${NB_UID}:${NB_GID} /var/lib/nginx /var/log/nginx /var/run /run \ |
|
&& chmod 755 /var/lib/nginx /var/run /run |
|
|
|
|
|
RUN touch /var/log/nginx/error.log /var/log/nginx/access.log /run/nginx.pid \ |
|
&& chown -R ${NB_UID}:${NB_GID} /var/log/nginx /run/nginx.pid |
|
|
|
|
|
RUN chown -R ${NB_UID}:${NB_GID} /app |
|
|
|
|
|
USER ${NB_UID} |
|
|
|
|
|
WORKDIR /home/${NB_USER}/app |
|
|
|
|
|
EXPOSE 8888 |
|
|
|
|
|
EXPOSE 7860 |
|
|
|
|
|
ENV JUPYTERLAB_PORT=8888 |
|
ENV JUPYTERLAB_TOKEN=your_secret_token |
|
ENV NGINX_PORT=7860 |
|
|
|
|
|
ENTRYPOINT ["/app/entrypoint.sh"] |