From fe347e2c626a253f3d0660d26076bd2f31595072 Mon Sep 17 00:00:00 2001 From: a-saraf Date: Tue, 12 Dec 2023 15:07:28 +0530 Subject: [PATCH] Dockerfile update with Miniconda installation --- sims/Timeloop/Dockerfile | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/sims/Timeloop/Dockerfile b/sims/Timeloop/Dockerfile index 996bd087..6133b6d8 100644 --- a/sims/Timeloop/Dockerfile +++ b/sims/Timeloop/Dockerfile @@ -1,18 +1,26 @@ -# start with miniconda image -FROM continuumio/miniconda3 - -RUN if ! id 1000; then useradd -m -u 1000 clouduser; fi - FROM nelliewu/accelergy-timeloop-infrastructure:latest AS builder # # Main image # FROM timeloopaccelergy/accelergy-timeloop-infrastructure:latest +RUN if ! id 1000; then useradd -m -u 1000 clouduser; fi + +# Install the base utilities +RUN apt-get update -y \ + && apt-get install -y less \ + && apt-get install -y build-essential \ + && apt-get install -y wget \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* -RUN apt-get update -y -RUN apt-get install -y less +# Install miniconda +ENV conda /opt/conda +RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \ + /bin/bash ~/miniconda.sh -b -p /opt/conda +# Put conda on the path +ENV PATH=$CONDA_DIR/bin:$PATH RUN cp -r /usr/local/src . WORKDIR /home/workspace/src @@ -22,7 +30,6 @@ RUN touch /home/workspace/.nointro RUN chown -R 1000:root /home/workspace && chmod -R 775 /home/workspace #RUN conda install - RUN git clone --recursive https://srivatsankrishnan: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@github.com/srivatsankrishnan/arch-gym.git RUN chown -R 1000:root /home/workspace && chmod -R 775 /home/workspace RUN cd arch-gym && conda env create -f environment.yml