40 lines
1.3 KiB
Docker
40 lines
1.3 KiB
Docker
FROM quay.io/pypa/manylinux2014_aarch64
|
|
|
|
SHELL ["/bin/bash", "-c"] # Use Bash as shell
|
|
|
|
# Install all basic requirements
|
|
RUN \
|
|
yum update -y && \
|
|
yum install -y tar unzip wget xz git centos-release-scl-rh yum-utils && \
|
|
yum-config-manager --enable centos-sclo-rh-testing && \
|
|
yum update -y && \
|
|
yum install -y devtoolset-9 && \
|
|
# Python
|
|
wget -nv -O conda.sh https://github.com/conda-forge/miniforge/releases/download/22.11.1-2/Mambaforge-22.11.1-2-Linux-aarch64.sh && \
|
|
bash conda.sh -b -p /opt/mambaforge
|
|
|
|
ENV PATH=/opt/mambaforge/bin:$PATH
|
|
ENV CC=/opt/rh/devtoolset-9/root/usr/bin/gcc
|
|
ENV CXX=/opt/rh/devtoolset-9/root/usr/bin/c++
|
|
ENV CPP=/opt/rh/devtoolset-9/root/usr/bin/cpp
|
|
ENV GOSU_VERSION 1.10
|
|
|
|
# Create new Conda environment
|
|
COPY conda_env/aarch64_test.yml /scripts/
|
|
RUN mamba create -n aarch64_test && \
|
|
mamba env update -n aarch64_test --file=/scripts/aarch64_test.yml && \
|
|
mamba clean --all
|
|
|
|
# Install lightweight sudo (not bound to TTY)
|
|
RUN set -ex; \
|
|
wget -nv -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-arm64" && \
|
|
chmod +x /usr/local/bin/gosu && \
|
|
gosu nobody true
|
|
|
|
# Default entry-point to use if running locally
|
|
# It will preserve attributes of created files
|
|
COPY entrypoint.sh /scripts/
|
|
|
|
WORKDIR /workspace
|
|
ENTRYPOINT ["/scripts/entrypoint.sh"]
|