Skip to content

Instantly share code, notes, and snippets.

@fsimonis
Created January 26, 2021 09:44
Show Gist options
  • Save fsimonis/df497a3c95735ead33b761d40426405c to your computer and use it in GitHub Desktop.
Save fsimonis/df497a3c95735ead33b761d40426405c to your computer and use it in GitHub Desktop.
# same behavior with ubuntu:20.04
FROM ubuntu:18.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get install -y -qq software-properties-common git
RUN add-apt-repository ppa:fenics-packages/fenics
RUN apt-get install -y --no-install-recommends fenics
RUN python3 -c "import ufl, dijitso, FIAT, ffc" && python3 -c "from fenics import *"
RUN apt-get install -y python3-venv
WORKDIR my_dummy_package
RUN echo "from setuptools import setup" >> setup.py
RUN echo "setup(name='dummy-package', install_requires=['fenics'])" >> setup.py
RUN python3 -m venv venv && \
. ./venv/bin/activate && \
which python && which pip && \
pip install wheel && \
pip list && \
pip install fenics && \
pip list && \
python -c "import ufl, dijitso, FIAT, ffc" && \
python -c "import fenics" # Should fail
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment