Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add docker/jupyter #58

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# install xfoil (taken from https://github.com/thomaseizinger/docker-xfoil/)
# and modified to use the intel compiler
FROM intel/oneapi-hpckit:latest as xfoil
RUN apt-get update
RUN apt-get install -y wget
RUN apt-get install -y git
RUN apt-get install -y libx11-dev
RUN wget https://web.mit.edu/drela/Public/web/xfoil/xfoil6.99.tgz -O /tmp/xfoil6.99.tgz
RUN tar -xzvf /tmp/xfoil6.99.tgz -C /
WORKDIR /Xfoil
COPY xfoil.patch .
RUN git apply xfoil.patch
WORKDIR /Xfoil/orrs/bin
RUN make osgen
RUN make osmap.o
WORKDIR /Xfoil/orrs
RUN bin/osgen osmaps_ns.lst
WORKDIR /Xfoil/plotlib
RUN make libPlt_gSP.a
WORKDIR /Xfoil/bin
RUN make xfoil
RUN make pplot
RUN make pxplot
WORKDIR /Xfoil

# install avl
FROM intel/oneapi-hpckit:latest as avl
RUN apt-get update
RUN apt-get install -y wget
RUN apt-get install -y git
RUN apt-get install -y libx11-dev
RUN wget https://web.mit.edu/drela/Public/web/avl/avl3.36.tgz -O /tmp/avl3.36.tgz
RUN tar -xzvf /tmp/avl3.36.tgz -C /
WORKDIR /Avl
RUN cp eispack/Makefile.ifort eispack/Makefile
RUN cp bin/Makefile.ifort bin/Makefile
WORKDIR /Avl/plotlib
RUN make ifort
WORKDIR /Avl/eispack
RUN make
WORKDIR /Avl/bin
RUN make


#
# base image
#
FROM continuumio/anaconda3
EXPOSE 8888

# copy xfoil binaries
COPY --from=xfoil /usr/local/bin/xfoil /usr/bin
COPY --from=xfoil /usr/local/bin/pplot /usr/bin
COPY --from=xfoil /usr/local/bin/pxplot /usr/bin

# copy avl binaries
COPY --from=avl /Avl/bin/avl /usr/bin

# set LD_LIBRARY_PATH
ENV LD_LIBRARY_PATH="/opt/conda/lib:${LD_LIBRARY_PATH}"


# install openscad
#RUN apt-get update && apt-get install -y \
# openscad

# install AeroSandbox latest releaseed version.
RUN pip install AeroSandbox

# copy ipython notebook
COPY aerodesign.ipynb /

# add command
CMD ["jupyter", "lab", "--ip='0.0.0.0'", "--port=8888", "--no-browser", "--allow-root"]
31 changes: 31 additions & 0 deletions docker/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

Docker build of jupyterlab with Aero design software installed:

Xfoil - https://web.mit.edu/drela/Public/web/xfoil/
compiled with intel fortran compiler. compiler docker image is 6gb so make sure you have space
I tried the gnu fortran compiler but compiled program was unstable.
AVL - https://web.mit.edu/drela/Public/web/avl/
compiled with intel fortran compiler
AeroSandbox - latest released version
(more softwares can be added)

Building
--------
docker build -t aerodesign ./


Running
-------

Prerequisite: docker For example: https://docs.docker.com/docker-for-windows/install/

docker run -p 8888:8888 aerodesign

When running, you will see output on how to connect to the jupyerlab using a browser. It will look something like:

http://127.0.0.1:8888/lab?token=c9118b1c6cc5453ca28c559f85a1aa1dc19b7998c41594b8

In the root directory, there is a jupyter notebook called aerodesign that shows some examples:
- Create and draw 3d geometry of a plane
- Draw a 2d airfoil
- calculate polars for a 2D airfoil using Xfoil and graph them
Loading