dockcross/manylinux-x64/Dockerfile.in

42 lines
1.2 KiB
Docker
Raw Normal View History

2016-09-20 17:35:18 +02:00
FROM quay.io/pypa/manylinux1_x86_64:latest
MAINTAINER Matt McCormick "matt.mccormick@kitware.com"
#include "common.docker"
RUN cd /opt && \
wget "http://smarden.org/runit/runit-2.1.2.tar.gz" && \
tar xvzf runit-2.1.2.tar.gz && \
cd admin/runit-2.1.2 && \
2016-09-20 17:35:18 +02:00
./package/install
2016-09-20 17:41:30 +02:00
COPY manylinux-x64/install-skbuild.sh /usr/local/bin
RUN /usr/local/bin/install-skbuild.sh
manylinux: Grant current user password less sudo access. This will allow build script like "build-wheels.sh" to run command like the following (see [1]): sudo yum install -y atlas-devel It will also allow to pip install using sudo and avoid error reported in [3]. That said, instead of running pip using sudo, the recommended approach is to specify the "--user" flag [2] [1] https://github.com/pypa/python-manylinux-demo/blob/893d92517e9e289b9d2ee063f19c3216a39534ab/travis/build-wheels.sh [2] http://stackoverflow.com/questions/7143077/how-can-i-install-packages-in-my-home-folder-with-pip#7143496 [3] Error reported when running pip without "sudo pip install <packagename" or "pip install --user <packagename>" ``` Exception: Traceback (most recent call last): File "/opt/_internal/cpython-2.7.11-ucs2/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/opt/_internal/cpython-2.7.11-ucs2/lib/python2.7/site-packages/pip/commands/install.py", line 317, in run prefix=options.prefix_path, File "/opt/_internal/cpython-2.7.11-ucs2/lib/python2.7/site-packages/pip/req/req_set.py", line 736, in install requirement.uninstall(auto_confirm=True) File "/opt/_internal/cpython-2.7.11-ucs2/lib/python2.7/site-packages/pip/req/req_install.py", line 742, in uninstall paths_to_remove.remove(auto_confirm) File "/opt/_internal/cpython-2.7.11-ucs2/lib/python2.7/site-packages/pip/req/req_uninstall.py", line 115, in remove renames(path, new_path) File "/opt/_internal/cpython-2.7.11-ucs2/lib/python2.7/site-packages/pip/utils/__init__.py", line 267, in renames shutil.move(old, new) File "/opt/_internal/cpython-2.7.11-ucs2/lib/python2.7/shutil.py", line 303, in move os.unlink(src) OSError: [Errno 13] Permission denied: '/opt/_internal/cpython-2.7.11-ucs2/bin/easy_install' ```
2016-09-22 07:11:12 +02:00
RUN yum -y install sudo
2016-09-20 17:35:18 +02:00
ENV CROSS_TRIPLE x86_64-linux-gnu
ENV CROSS_ROOT /opt/rh/devtoolset-2/root/usr/bin
ENV AS=${CROSS_ROOT}/as \
AR=${CROSS_ROOT}/ar \
CC=${CROSS_ROOT}/gcc \
CPP=${CROSS_ROOT}/cpp \
CXX=${CROSS_ROOT}/g++ \
2016-09-20 17:35:18 +02:00
LD=${CROSS_ROOT}/ld
COPY linux-x64/${CROSS_TRIPLE}-noop.sh /usr/bin/${CROSS_TRIPLE}-noop
COPY manylinux-x64/Toolchain.cmake ${CROSS_ROOT}/../lib/
ENV CMAKE_TOOLCHAIN_FILE ${CROSS_ROOT}/../lib/Toolchain.cmake
ENV DEFAULT_DOCKCROSS_IMAGE dockcross/manylinux-x64
# Build-time metadata as defined at http://label-schema.org
ARG BUILD_DATE
ARG IMAGE
ARG VCS_REF
ARG VCS_URL
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.name=$IMAGE \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vcs-url=$VCS_URL \
org.label-schema.schema-version="1.0"