-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #340 from alphaville/feature/update-docker-img
Update docker image
- Loading branch information
Showing
3 changed files
with
68 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,10 +19,11 @@ FROM debian:stable | |
|
||
# Labels for the docker image | ||
LABEL maintainer="Pantelis Sopasakis <[email protected]>" \ | ||
license="MIT license" \ | ||
description="Jupyter notebook for Optimization Engine (OpEn)" | ||
license="MIT license" \ | ||
description="Jupyter notebook for Optimization Engine (OpEn)" | ||
|
||
WORKDIR /open | ||
VOLUME /open | ||
|
||
# Example Python notebook | ||
COPY example.ipynb /open/ | ||
|
@@ -32,28 +33,29 @@ ENV PATH="/root/.cargo/bin:${PATH}" | |
# These commands are groupped into a separate RUN to faciliate | ||
# caching; it is unlikely that any of the following will change | ||
# in future versions of this docker image | ||
RUN "sh" "-c" "echo nameserver 8.8.8.8 >> /etc/resolv.conf" \ | ||
&& apt-get update -y \ | ||
RUN apt-get update -y \ | ||
&& apt-get -y --no-install-recommends install \ | ||
build-essential \ | ||
curl \ | ||
jupyter-notebook \ | ||
python3 \ | ||
python3-pip \ | ||
python3-setuptools \ | ||
&& curl https://sh.rustup.rs -sSf | bash -s -- -y \ | ||
&& pip3 install wheel \ | ||
&& pip3 install opengen \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
build-essential \ | ||
curl \ | ||
jupyter-notebook \ | ||
python3 \ | ||
python3-pip \ | ||
python3-setuptools \ | ||
python3-venv \ | ||
&& curl https://sh.rustup.rs -sSf | bash -s -- -y \ | ||
&& cd /; python3 -m venv venv \ | ||
&& /bin/bash -c "source /venv/bin/activate && pip install wheel && pip install opengen && pip install jupyter" \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& echo "source /venv/bin/activate" >> /root/.bashrc | ||
|
||
EXPOSE 8888 | ||
|
||
# Run the following command every time this docker image | ||
# is executed | ||
COPY start_jupyter_notebook.sh / | ||
RUN ["chmod", "+x", "/start_jupyter_notebook.sh"] | ||
ENTRYPOINT ["/start_jupyter_notebook.sh"] | ||
CMD ["/start_jupyter_notebook.sh"] | ||
CMD ["/bin/bash", "/start_jupyter_notebook.sh"] | ||
|
||
|
||
|
||
|
@@ -64,4 +66,5 @@ CMD ["/start_jupyter_notebook.sh"] | |
# | ||
# from within the base directory of this project. | ||
# | ||
# | ||
# ------------------------------------------------------------------------------ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters