msspec_python3/Dockerfile

31 lines
892 B
Docker

# Get the base Python image
FROM python:latest
# Set the working directory in the container
WORKDIR /code
# Fetch the code
RUN git clone --branch devel https://git.ipr.univ-rennes1.fr/epsi/msspec_python3.git .
# Install system dependencies
RUN apt-get update && apt-get install -y virtualenv gfortran libgtk-3-dev
# Install msspec
ENV PATH=/opt/bin:$PATH
RUN make install VERBOSE=1 INSTALL_PREFIX=/opt
# Add a non-privileged user
RUN useradd -ms /bin/bash msspec
USER msspec
WORKDIR /home/msspec
# Customize a bit the prompt and load the msspec virtualenv
RUN echo "alias idle=\"python -m idlelib.idle 2>/dev/null\"" >> .bashrc && \
echo "export PS1=\"\w\$ \"" >> .bashrc && \
echo "$(msspec -e)" >> .bashrc && \
mkdir data && \
cp /code/doc/source/tutorials/copper/Cu_simple.py data/example.py
# Run the msspec frontend command on startup
ENTRYPOINT ["/bin/bash"]