From 770ae7b76de6c41bec69fc5f4a3464aeed3e9be5 Mon Sep 17 00:00:00 2001 From: Jack Lashner Date: Mon, 21 Mar 2022 11:39:50 -0400 Subject: [PATCH 1/5] Change docker base to socs --- Dockerfile | 46 +++++++++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/Dockerfile b/Dockerfile index dc2dcd6a..c727311b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -46,22 +46,33 @@ ENV PYTHONPATH /usr/local/src/spt3g_software/build:${PYTHONPATH} # SO3G Install ################################################################# WORKDIR /usr/local/src -ENV LANG C.UTF-8 - -RUN git clone https://github.com/simonsobs/so3g.git -WORKDIR /usr/local/src/so3g -RUN pip3 install -r requirements.txt - -ENV Spt3g_DIR /usr/local/src/spt3g_software -# Install qpoint -RUN /bin/bash /usr/local/src/so3g/docker/qpoint-setup.sh - -# Build so3g -RUN mkdir build \ - && cd build \ - && cmake .. -DCMAKE_PREFIX_PATH=$SPT3G_SOFTWARE_BUILD_PATH \ - && make \ - && make install +RUN mkdir /usr/local/src/IPMC && mkdir /usr/local/src/FirmwareLoader +RUN git clone --depth 1 https://github.com/slaclab/smurf-base-docker.git +RUN tar -xf /usr/local/src/smurf-base-docker/packages/IPMC.tar.gz \ + -C /usr/local/src/IPMC +RUN tar -xf /usr/local/src/smurf-base-docker/packages/FirmwareLoader.tar.gz \ + -C /usr/local/src/FirmwareLoader + +ENV LD_LIBRARY_PATH /usr/local/src/IPMC/lib64:${LD_LIBRARY_PATH} +ENV PATH /usr/local/src/IPMC/bin/x86_64-linux-dbg:${PATH} +ENV PATH /usr/local/src/FirmwareLoader:${PATH} + +# Install EPICS +RUN mkdir -p /usr/local/src/epics/base-3.15.5 +WORKDIR /usr/local/src/epics/base-3.15.5 +RUN wget -c base-3.15.5.tar.gz https://github.com/epics-base/epics-base/archive/R3.15.5.tar.gz -O - | tar zx --strip 1 && \ + make clean && make && make install && \ + find . -maxdepth 1 \ + ! -name bin -a ! -name lib -a ! -name include \ + -exec rm -rf {} + \ + || true +ENV EPICS_BASE /usr/local/src/epics/base-3.15.5 +ENV EPICS_HOST_ARCH linux-x86_64 +ENV PATH /usr/local/src/epics/base-3.15.5/bin/linux-x86_64:${PATH} +ENV LD_LIBRARY_PATH /usr/local/src/epics/base-3.15.5/lib/linux-x86_64:${LD_LIBRARY_PATH} +ENV PYEPICS_LIBCA /usr/local/src/epics/base-3.15.5/lib/linux-x86_64/libca.so + +RUN pip3 install ipython numpy pyepics ################################################################# # SOTODLIB Install @@ -92,6 +103,3 @@ COPY . /sodetlib WORKDIR /sodetlib RUN pip3 install -e . RUN pip3 install -r requirements.txt - -# This is to get the leap-second download out of the way -RUN python3 -c "import so3g" From 17c3d76c99bbeb8e52100fa28991420546c88b02 Mon Sep 17 00:00:00 2001 From: Jack Lashner Date: Thu, 24 Mar 2022 12:47:46 -0400 Subject: [PATCH 2/5] Dockerfile update --- Dockerfile | 2 ++ requirements.txt | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c727311b..7b0ab5fc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -103,3 +103,5 @@ COPY . /sodetlib WORKDIR /sodetlib RUN pip3 install -e . RUN pip3 install -r requirements.txt + +RUN rm -rf /var/lib/apt/lists/* diff --git a/requirements.txt b/requirements.txt index 2f3ec8d6..c03b3c9d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,9 +3,11 @@ tqdm setuptools >= 56.2.0 ipykernel>=5.5.4 jedi==0.17.1 -PyYAML +PyYAML==5.3.1 numpy scipy matplotlib lmfit pyfftw +pandas +seaborn From 91aa0fc0818597743d9d071b289467e1616424a2 Mon Sep 17 00:00:00 2001 From: Jack Lashner Date: Tue, 29 Nov 2022 14:32:24 -0500 Subject: [PATCH 3/5] Build docker off of so_smurf_base --- Dockerfile | 102 ++--------------------------------------------------- 1 file changed, 2 insertions(+), 100 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7b0ab5fc..b1da5034 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,100 +1,4 @@ -# sodetlib dockerfile. -FROM tidair/pysmurf-client:v7.1.0 - -################################################################# -# SPT3G Install -################################################################# -WORKDIR /usr/local/src/ - -ENV TZ=Etc/UTC -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone - -RUN apt-get update - -RUN apt-get install -y \ - libboost-all-dev \ - libflac-dev \ - libnetcdf-dev \ - libfftw3-dev \ - libgsl0-dev \ - tcl \ - environment-modules \ - gdb \ - rsync \ - cmake \ - libblas-dev \ - # so3g reqs - automake \ - gfortran \ - build-essential \ - libbz2-dev \ - libopenblas-dev \ - && rm -rf /var/lib/apt/lists/* - -RUN git clone https://github.com/CMB-S4/spt3g_software.git && cd spt3g_software && git checkout 5f30121395129de9c9a6af2976de8ba8e876b5a8 -RUN cd spt3g_software \ - && mkdir -p build \ - && cd build \ - && cmake .. -DPYTHON_EXECUTABLE=`which python3` \ - && make core version - -ENV SPT3G_SOFTWARE_PATH /usr/local/src/spt3g_software -ENV SPT3G_SOFTWARE_BUILD_PATH /usr/local/src/spt3g_software/build -ENV PYTHONPATH /usr/local/src/spt3g_software/build:${PYTHONPATH} - -################################################################# -# SO3G Install -################################################################# -WORKDIR /usr/local/src -RUN mkdir /usr/local/src/IPMC && mkdir /usr/local/src/FirmwareLoader -RUN git clone --depth 1 https://github.com/slaclab/smurf-base-docker.git -RUN tar -xf /usr/local/src/smurf-base-docker/packages/IPMC.tar.gz \ - -C /usr/local/src/IPMC -RUN tar -xf /usr/local/src/smurf-base-docker/packages/FirmwareLoader.tar.gz \ - -C /usr/local/src/FirmwareLoader - -ENV LD_LIBRARY_PATH /usr/local/src/IPMC/lib64:${LD_LIBRARY_PATH} -ENV PATH /usr/local/src/IPMC/bin/x86_64-linux-dbg:${PATH} -ENV PATH /usr/local/src/FirmwareLoader:${PATH} - -# Install EPICS -RUN mkdir -p /usr/local/src/epics/base-3.15.5 -WORKDIR /usr/local/src/epics/base-3.15.5 -RUN wget -c base-3.15.5.tar.gz https://github.com/epics-base/epics-base/archive/R3.15.5.tar.gz -O - | tar zx --strip 1 && \ - make clean && make && make install && \ - find . -maxdepth 1 \ - ! -name bin -a ! -name lib -a ! -name include \ - -exec rm -rf {} + \ - || true -ENV EPICS_BASE /usr/local/src/epics/base-3.15.5 -ENV EPICS_HOST_ARCH linux-x86_64 -ENV PATH /usr/local/src/epics/base-3.15.5/bin/linux-x86_64:${PATH} -ENV LD_LIBRARY_PATH /usr/local/src/epics/base-3.15.5/lib/linux-x86_64:${LD_LIBRARY_PATH} -ENV PYEPICS_LIBCA /usr/local/src/epics/base-3.15.5/lib/linux-x86_64/libca.so - -RUN pip3 install ipython numpy pyepics - -################################################################# -# SOTODLIB Install -################################################################# -WORKDIR /usr/local/src - -# Freeze sotodlib before so3g was added as requirement -RUN git clone https://github.com/simonsobs/sotodlib.git && cd sotodlib && git checkout e37d2c0b342f609cf640ee79541c98f7a2d7485a -RUN pip3 install quaternionarray sqlalchemy -RUN pip3 install ./sotodlib - -################################################################# -# OCS Install -################################################################# -RUN git clone --branch py36 https://github.com/simonsobs/ocs.git - -RUN pip3 install cryptography==3.3.2 -# RUN pip3 install -r ocs/requirements.txt -RUN pip3 install ./ocs - -# Sets ocs configuration environment -ENV OCS_CONFIG_DIR=/config +FROM simonsobs/so_smurf_base:v0.0.1 ################################################################# # sodetlib Install @@ -102,6 +6,4 @@ ENV OCS_CONFIG_DIR=/config COPY . /sodetlib WORKDIR /sodetlib RUN pip3 install -e . -RUN pip3 install -r requirements.txt - -RUN rm -rf /var/lib/apt/lists/* +RUN pip3 install -r requirements.txt \ No newline at end of file From 70b84bb3b415681e8f4aec57ee3834b1fd571a25 Mon Sep 17 00:00:00 2001 From: Jack Lashner Date: Wed, 7 Dec 2022 12:58:35 -0500 Subject: [PATCH 4/5] Update to so_smurf_base v0.0.2 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b1da5034..d35473ce 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM simonsobs/so_smurf_base:v0.0.1 +FROM simonsobs/so_smurf_base:v0.0.2 ################################################################# # sodetlib Install From 7ff66ef0d16171880010d8e390ecab9974507b31 Mon Sep 17 00:00:00 2001 From: Jack Lashner Date: Thu, 8 Dec 2022 11:57:49 -0500 Subject: [PATCH 5/5] Remove frozen yaml version --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index c03b3c9d..366b29e7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,7 @@ tqdm setuptools >= 56.2.0 ipykernel>=5.5.4 jedi==0.17.1 -PyYAML==5.3.1 +PyYAML numpy scipy matplotlib