From a967691bb60a31562a1da2b3f88e0e02e1c5850e Mon Sep 17 00:00:00 2001 From: Stefano Carrazza Date: Sat, 28 Aug 2021 20:29:53 +0200 Subject: [PATCH] fixing typos --- docker/Dockerfile | 45 -------------------------------------------- docker/dockerfile | 48 ++++++++++++++++++++++++----------------------- 2 files changed, 25 insertions(+), 68 deletions(-) delete mode 100644 docker/Dockerfile diff --git a/docker/Dockerfile b/docker/Dockerfile deleted file mode 100644 index f811e368f..000000000 --- a/docker/Dockerfile +++ /dev/null @@ -1,45 +0,0 @@ -# Download base image ubuntu latest -FROM ubuntu:latest - -# LABEL about the custom image -LABEL maintainer="NNPDF" -LABEL description="Image with NNPDF tagged code." - -ENV CONDA_URL https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -ENV CONDA_FILE Miniconda3-latest-Linux-x86_64.sh - -# Disable Prompt During Packages Installation -ARG DEBIAN_FRONTEND=noninteractive - -# # Update Ubuntu Software repository -RUN apt update - -# Install wget -RUN apt install -y wget - -# Istall conda -RUN wget "$CONDA_URL" && \ - chmod +x "$CONDA_FILE" && \ - ./"$CONDA_FILE" -b && \ - rm "$CONDA_FILE" - -ENV PATH /root/miniconda3/bin:$PATH - -# Setup conda channels -RUN conda config --append channels conda-forge && \ - conda config --prepend channels https://packages.nnpdf.science/public/ && \ - conda config --set show_channel_urls true && \ - conda init bash - -# Copy conda package to image -COPY conda-bld /root/conda-bld - -# install the nnpdf framework -RUN conda create -n nnpdfenv -c file:///root/conda-bld/linux-64 nnpdf && \ - echo "conda activate nnpdfenv" >> /root/.bashrc - -# delete package -RUN rm -r /root/conda-bld - -# run bash as entrypoint -ENTRYPOINT bash diff --git a/docker/dockerfile b/docker/dockerfile index 50ea57c0d..e5e4ea86f 100644 --- a/docker/dockerfile +++ b/docker/dockerfile @@ -1,30 +1,23 @@ -FROM centos:7 - -MAINTAINER Zahari Kassabov - -ENV SUMMARY = "CentOS toolchain for conda recipes"\ -DESCRIPTION = "Image that allows building packages uisng newer\ - compilers in a way that they are compatible\ - with old linuxes" - -#Set locale for good -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en -ENV LC_ALL en_US.UTF-8 +# Download base image ubuntu latest +FROM ubuntu:latest +# LABEL about the custom image +LABEL maintainer="NNPDF" +LABEL description="Image with NNPDF tagged code." ENV CONDA_URL https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh ENV CONDA_FILE Miniconda3-latest-Linux-x86_64.sh -LABEL summary="$SUMMARY"\ - description="$DESCRIPTION" +# Disable Prompt During Packages Installation +ARG DEBIAN_FRONTEND=noninteractive -RUN yum install -y centos-release-scl &&\ - yum install -y devtoolset-7 \ - wget \ - git \ - patch +# Update Ubuntu Software repository +RUN apt update +# Install wget +RUN apt install -y wget + +# Install conda RUN wget "$CONDA_URL" && \ chmod +x "$CONDA_FILE" && \ ./"$CONDA_FILE" -b && \ @@ -32,12 +25,21 @@ RUN wget "$CONDA_URL" && \ ENV PATH /root/miniconda3/bin:$PATH +# Setup conda channels RUN conda config --append channels conda-forge && \ conda config --prepend channels https://packages.nnpdf.science/public/ && \ conda config --set show_channel_urls true && \ - conda install conda-build --yes + conda init bash + +# Copy conda package to image +COPY conda-bld /root/conda-bld -ENV CXXFLAGS -D_GLIBCXX_USE_CXX11_ABI=1 +# install the nnpdf framework +RUN conda create -n nnpdfenv -c file:///root/conda-bld/linux-64 nnpdf && \ + echo "conda activate nnpdfenv" >> /root/.bashrc -ENTRYPOINT scl enable devtoolset-7 bash +# delete package +RUN rm -r /root/conda-bld +# run bash as entrypoint +ENTRYPOINT bash