mlflow-easyauth icon indicating copy to clipboard operation
mlflow-easyauth copied to clipboard

Docker image build fails due to cartography library dependencies

Open tonofll opened this issue 4 years ago • 3 comments

When running docker image creation command


docker build -t my-mlflow-easyauth:latest .

It fails when building wheel for cartography

  =============================DEBUG ASSISTANCE=============================
  If you are seeing a compilation error please try the following steps to
  successfully install cryptography:
  1) Upgrade to the latest pip and try again. This will fix errors for most
     users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
  2) Read https://cryptography.io/en/latest/installation.html for specific
     instructions for your platform.
  3) Check our frequently asked questions for more information:
     https://cryptography.io/en/latest/faq.html
  4) Ensure you have a recent Rust toolchain installed:
     https://cryptography.io/en/latest/installation.html#rust
  5) If you are experiencing issues with Rust for *this release only* you may
     set the environment variable `CRYPTOGRAPHY_DONT_BUILD_RUST=1`.
  =============================DEBUG ASSISTANCE=============================

error: Can not find Rust compiler


Failed building wheel for cryptography

This error is produced due to issue https://github.com/pyca/cryptography/issues/5771

It can be easily solved by upgrading pip in the Dockerfile

RUN set -x \
    && apt-get update \
    && apt-get install --no-install-recommends --no-install-suggests -y \
    python3 python3-pip python3-setuptools python3-pandas supervisor gettext-ba$
    && python3 -m pip install -U pip \
    && pip3 install wheel \
    && pip3 install -r requirements.txt \
    && apt-get remove --purge --auto-remove -y ca-certificates && rm -rf /var/l$

tonofll avatar Feb 23 '21 13:02 tonofll

Hey @tonofll

I was able to get past that by referring to this section on Cryptography's documentation.

ajeyamk avatar Apr 29 '21 22:04 ajeyamk

Thanks @tonofll

tbrodbeck avatar May 21 '21 18:05 tbrodbeck

Are there any changes needed in our Dockerfiles for this? The build seems to be fine here now.

jonnor avatar Oct 17 '21 14:10 jonnor

Closing as this should have been fixed now.

jonnor avatar Oct 24 '22 19:10 jonnor