Work on docker support.
epsi-builds/msspec_python3/pipeline/head There was a failure building this commit
Details
epsi-builds/msspec_python3/pipeline/head There was a failure building this commit
Details
pip was not the default script in the virtualenv in the docker image (pip3 was). So we had to use "ensurepip" as recommended by the pip team. The Dockerfile was a bit simplified.
This commit is contained in:
parent
4b23806482
commit
230340b1fd
32
Dockerfile
32
Dockerfile
|
@ -1,30 +1,24 @@
|
||||||
# Get the base Python image
|
# Get the base Python image
|
||||||
FROM python:latest
|
FROM python:latest
|
||||||
|
|
||||||
|
# Install system dependencies
|
||||||
|
RUN apt-get update && apt-get install -y virtualenv gfortran libgtk-3-dev nano
|
||||||
|
|
||||||
|
# Add a non-privileged user
|
||||||
|
RUN useradd -ms /bin/bash -d /opt/msspec msspec
|
||||||
|
|
||||||
# Set the working directory in the container
|
# Set the working directory in the container
|
||||||
WORKDIR /code
|
USER msspec
|
||||||
|
RUN mkdir -p /opt/msspec/code
|
||||||
|
WORKDIR /opt/msspec/code
|
||||||
|
|
||||||
# Fetch the code
|
# Fetch the code
|
||||||
RUN git clone --branch devel https://git.ipr.univ-rennes1.fr/epsi/msspec_python3.git .
|
RUN git clone --branch devel https://git.ipr.univ-rennes1.fr/epsi/msspec_python3.git .
|
||||||
|
#COPY --chown=msspec:msspec . .
|
||||||
# Install system dependencies
|
|
||||||
RUN apt-get update && apt-get install -y virtualenv gfortran libgtk-3-dev
|
|
||||||
|
|
||||||
# Install msspec
|
# Install msspec
|
||||||
ENV PATH=/opt/bin:$PATH
|
ENV PATH=/opt/msspec/.local/bin:$PATH
|
||||||
RUN make install VERBOSE=1 INSTALL_PREFIX=/opt
|
RUN make install VERBOSE=1
|
||||||
|
|
||||||
# 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
|
# Run the msspec frontend command on startup
|
||||||
ENTRYPOINT ["/bin/bash"]
|
ENTRYPOINT ["msspec"]
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -11,7 +11,7 @@ pybinding:
|
||||||
venv:
|
venv:
|
||||||
ifeq ($(NO_VENV),0)
|
ifeq ($(NO_VENV),0)
|
||||||
@virtualenv --python=$(PYTHON_EXE) --prompt="(msspec-$(VERSION)) " $(VENV_PATH)
|
@virtualenv --python=$(PYTHON_EXE) --prompt="(msspec-$(VERSION)) " $(VENV_PATH)
|
||||||
@$(INSIDE_VENV) pip install --upgrade pip && pip install -r src/pip.freeze
|
@$(INSIDE_VENV) python -m ensurepip --upgrade --default-pip && pip install -r src/pip.freeze
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue