feat: kubernetes node resource queries

This commit is contained in:
2026-08-10 11:43:05 +02:00
parent 7b9188ab54
commit c253d30b5d
6 changed files with 439 additions and 52 deletions

View File

@@ -4,60 +4,34 @@ WORKDIR /opt/nextflow
COPY . /opt/nextflow
RUN chmod +x ./gradlew ./launch.sh ./nextflow || true
RUN ./gradlew clean assemble exportClasspath
RUN chmod +x ./gradlew
RUN mkdir -p /opt/nextflow-runtime/lib \
&& i=0; \
tr ':' '\n' < /opt/nextflow/.launch.classpath | while read -r path; do \
if [ -f "$path" ]; then \
name="$(basename "$path")"; \
target="/opt/nextflow-runtime/lib/$name"; \
runtime_path="/opt/nextflow/lib/$name"; \
if [ -e "$target" ]; then \
i=$((i+1)); \
target="/opt/nextflow-runtime/lib/${i}-$name"; \
runtime_path="/opt/nextflow/lib/${i}-$name"; \
fi; \
cp "$path" "$target"; \
echo "$runtime_path" >> /opt/nextflow-runtime/.launch.classpath.lines; \
fi; \
done \
&& paste -sd ':' /opt/nextflow-runtime/.launch.classpath.lines > /opt/nextflow-runtime/.launch.classpath
RUN ./gradlew clean assemble pack
RUN mkdir -p /opt/nextflow-runtime/plugins \
&& cp /opt/nextflow/launch.sh /opt/nextflow-runtime/launch.sh \
&& cp /opt/nextflow/nextflow /opt/nextflow-runtime/nextflow \
&& cp -a /opt/nextflow/plugins/nf-k8s /opt/nextflow-runtime/plugins/nf-k8s
RUN mkdir -p /tmp/nf-unpack /opt/nf-dist \
&& cd /tmp/nf-unpack \
&& jar xf /opt/nextflow/modules/nextflow/build/distributions/nextflow-26.04.0.zip \
&& cp -a nextflow-*/* /opt/nf-dist/ \
&& chmod +x /opt/nf-dist/bin/nextflow
RUN mkdir -p /tmp/nxf-home/plugins/nf-k8s-1.5.2 \
&& cd /tmp/nxf-home/plugins/nf-k8s-1.5.2 \
&& jar xf /opt/nextflow/plugins/nf-k8s/build/distributions/nf-k8s-1.5.2.zip
RUN mkdir -p /tmp/nxf-home/plugins/nf-amazon-3.9.0 \
&& cd /tmp/nxf-home/plugins/nf-amazon-3.9.0 \
&& jar xf /opt/nextflow/plugins/nf-amazon/build/distributions/nf-amazon-3.9.0.zip
FROM eclipse-temurin:17-jre
WORKDIR /opt/nextflow
COPY --from=build /opt/nextflow-runtime /opt/nextflow
COPY --from=build /opt/nf-dist /opt/nextflow
COPY --from=build /tmp/nxf-home /opt/nextflow/.nextflow
RUN chmod +x /opt/nextflow/launch.sh \
&& cp /opt/nextflow/launch.sh /opt/nextflow/nextflow \
&& chmod +x /opt/nextflow/nextflow \
&& echo "nextflow-dvfs-dev-image 0.1" > /opt/nextflow/DEV_IMAGE_MARKER
ENV PATH="/opt/nextflow/bin:${PATH}"
ENV NXF_HOME="/opt/nextflow/.nextflow"
ENV NXF_PLUGINS_DIR="/opt/nextflow/.nextflow/plugins"
ENV JAVA_OPTS="--add-opens java.base/java.nio.file.spi=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util.concurrent=ALL-UNNAMED"
RUN mkdir -p /opt/nextflow/conf \
&& cat > /opt/nextflow/conf/scm <<'EOF'
providers {
mygitea {
platform = 'gitea'
server = 'https://gitea.kleine.eulenhexe.de'
endpoint = 'https://gitea.kleine.eulenhexe.de/api/v1'
}
}
EOF
ENV PATH="/opt/nextflow:${PATH}"
ENV NXF_HOME="/tmp/.nextflow"
ENV NXF_PLUGINS_MODE="dev"
ENV NXF_PLUGINS_DIR="/opt/nextflow/plugins"
ENV NXF_SCM_FILE="/opt/nextflow/conf/scm"
ENTRYPOINT ["/opt/nextflow/launch.sh"]
ENTRYPOINT ["/opt/nextflow/bin/nextflow"]