Skip to content

Commit 945efe5

Browse files
committed
Finally working image (still broken htcondor piece)
1 parent 6af7525 commit 945efe5

2 files changed

Lines changed: 36 additions & 31 deletions

File tree

docker/Dockerfile.cc-analysis-alma9

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,17 @@ ENV LC_ALL en_US.UTF-8
3636
ENV LANG en_US.UTF-8
3737
ENV LANGUAGE en_US.UTF-8
3838

39+
# Terrible bug in all .r0 not allowing to use our xcache
40+
RUN conda uninstall -y ca-policy-lcg
41+
3942
# Install all OS dependencies for notebook server that starts but lacks all
4043
# features (e.g., download as all possible file formats)
41-
RUN yum -y update \
44+
RUN yum install -y https://repo.osg-htc.org/osg/24-main/osg-24-main-el9-release-latest.rpm \
45+
&& yum -y update \
4246
&& yum -y group install "Development Tools" \
4347
&& yum -y install \
4448
wget \
49+
osg-ca-certs \
4550
epel-release \
4651
gettext \
4752
bzip2 \
@@ -149,10 +154,6 @@ RUN cd /tmp && \
149154
ENV XRD_PLUGINCONFDIR="${CONDA_DIR}/etc/xrootd/client.plugins.d/"
150155
ENV XRD_PLUGIN="${CONDA_DIR}/lib/libXrdClXcachePlugin-5.so"
151156

152-
# Include additional CA certificates beyond ca-policy-lcg
153-
COPY certs/* /etc/grid-security/certificates/
154-
RUN openssl rehash /etc/grid-security/certificates/
155-
156157
# TODO: RETEST IF WE STILL NEED THIS
157158
ENV LD_LIBRARY_PATH="${CONDA_DIR}/lib/:$LD_LIBRARY_PATH"
158159
ENV PATH="${CONDA_DIR}/bin/:$PATH"
@@ -161,18 +162,22 @@ USER root
161162
# Setup supervisord files
162163
COPY k8s-worker/supervisord.conf /etc/supervisor/
163164

164-
#TODO please remove this line later: rm -rf /usr/local/etc/grid-security/certificates/*.r0 && \
165-
RUN rm -rf /etc/grid-security && \
166-
rm -rf /usr/local/etc/grid-security/certificates/*.r0 && \
167-
cp -R /usr/local/etc/grid-security /etc/grid-security && \
168-
chown -h "${NB_USER}:${NB_GID}" /etc/grid-security && \
169-
test -d /usr/local/etc/grid-security && chmod -R 755 /usr/local/etc/grid-security && \
170-
find /usr/local/etc/grid-security -type f -exec chmod g-w {} + && \
171-
test -d /etc/grid-security && chmod -R 755 /etc/grid-security
165+
# Fix permission after all packages installations are done
166+
RUN fix-permissions "${CONDA_DIR}"
172167

168+
# Include additional CA certificates beyond ca-policy-lcg
169+
COPY certs/* /etc/grid-security/certificates/
170+
RUN openssl rehash /etc/grid-security/certificates/
171+
172+
RUN chmod -R g-w /usr/local/etc/grid-security/ && chmod -R g-w /etc/grid-security/
173+
#chown -h "${NB_USER}:${NB_GID}" /etc/grid-security && \
174+
#test -d /usr/local/etc/grid-security && chmod -R 755 /usr/local/etc/grid-security && \
175+
#find /usr/local/etc/grid-security -type f -exec chmod g-w {} + && \
176+
#test -d /etc/grid-security && chmod -R 755 /etc/grid-security
173177
# Setup HTCondor user/group and change group for user $NB_USER
174178
# Fix error (submitting jobs as user/group 0 (root) is not allowed for security reasons) and
175179
# it configured from kubernetes side and updated in docker container to match it
180+
176181
RUN groupadd -r condor && \
177182
useradd -r -g condor -d /var/lib/condor -s /sbin/nologin condor
178183

@@ -208,8 +213,5 @@ RUN mkdir /cvmfs
208213
ADD prepare-env/prepare-env-cc-analysis.sh /usr/local/bin/prepare-env.sh
209214
RUN chmod ugo+x /usr/local/bin/prepare-env.sh
210215

211-
# Fix permission after all packages installations are done
212-
RUN fix-permissions "${CONDA_DIR}"
213-
214216
USER $NB_USER
215217
ENTRYPOINT ["tini", "-g", "--", "/usr/local/bin/prepare-env.sh"]

docker/Dockerfile.cc-dask-alma9

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,21 @@ ENV LC_ALL en_US.UTF-8
6363
ENV LANG en_US.UTF-8
6464
ENV LANGUAGE en_US.UTF-8
6565

66+
# Terrible bug in all .r0 not allowing to use our xcache
67+
RUN conda uninstall -y ca-policy-lcg
68+
6669
# Install all OS dependencies for notebook server that starts but lacks all
6770
# features (e.g., download as all possible file formats)
68-
RUN yum -y update \
71+
RUN yum install -y https://repo.osg-htc.org/osg/24-main/osg-24-main-el9-release-latest.rpm \
72+
&& yum -y update \
6973
&& yum -y group install "Development Tools" \
7074
&& yum -y install \
7175
wget \
7276
epel-release \
7377
gettext \
7478
bzip2 \
7579
ca-certificates \
80+
osg-ca-certs \
7681
sudo \
7782
gcc \
7883
langpacks-en \
@@ -278,14 +283,14 @@ RUN cd /tmp && \
278283
ENV XRD_PLUGINCONFDIR="${CONDA_DIR}/etc/xrootd/client.plugins.d/"
279284
ENV XRD_PLUGIN="${CONDA_DIR}/lib/libXrdClXcachePlugin-5.so"
280285

281-
# Include additional CA certificates beyond ca-policy-lcg
282-
COPY certs/* /etc/grid-security/certificates/
283-
RUN openssl rehash /etc/grid-security/certificates/
284-
285286
# Coffea_casa - > jobqueue-coffea-casa.yaml
286287
COPY dask/jobqueue-coffea-casa.yaml dask/dask_tls.yaml ${DASK_ROOT_CONFIG}/
287288

288289
USER root
290+
291+
# Fix permission after all packages installations are done
292+
RUN fix-permissions "${CONDA_DIR}"
293+
289294
# Distributed: we need to install patched version of distributed version
290295
COPY dask/distributed ${CONDA_DIR}/lib/python3.12/site-packages/distributed
291296
RUN cd ${CONDA_DIR}/lib/python3.12/site-packages/distributed && \
@@ -305,17 +310,15 @@ RUN rm -rf /tmp/* \
305310
ADD prepare-env/prepare-env-cc.sh /usr/local/bin/prepare-env.sh
306311
RUN chmod ugo+x /usr/local/bin/prepare-env.sh
307312

308-
#TODO please remove this line later: rm -rf /usr/local/etc/grid-security/certificates/*.r0 && \
309-
RUN rm -rf /etc/grid-security && \
310-
rm -rf /usr/local/etc/grid-security/certificates/*.r0 && \
311-
cp -R /usr/local/etc/grid-security /etc/grid-security && \
312-
chown -h "${NB_USER}:${NB_GID}" /etc/grid-security && \
313-
test -d /usr/local/etc/grid-security && chmod -R 755 /usr/local/etc/grid-security && \
314-
find /usr/local/etc/grid-security -type f -exec chmod g-w {} + && \
315-
test -d /etc/grid-security && chmod -R 755 /etc/grid-security
313+
# Include additional CA certificates beyond ca-policy-lcg
314+
COPY certs/* /etc/grid-security/certificates/
315+
RUN openssl rehash /etc/grid-security/certificates/
316316

317-
# Fix permission after all packages installations are done
318-
RUN fix-permissions "${CONDA_DIR}"
317+
RUN chmod -R g-w /usr/local/etc/grid-security/ && chmod -R g-w /etc/grid-security/
318+
#chown -h "${NB_USER}:${NB_GID}" /etc/grid-security && \
319+
#test -d /usr/local/etc/grid-security && chmod -R 755 /usr/local/etc/grid-security && \
320+
#find /usr/local/etc/grid-security -type f -exec chmod g-w {} + && \
321+
#test -d /etc/grid-security && chmod -R 755 /etc/grid-security
319322

320323
# Switch back to cms-jovyan to avoid accidental container runs as root
321324
USER ${NB_UID}

0 commit comments

Comments
 (0)