Skip to content

Commit

Permalink
workaround fix for SSL issue
Browse files Browse the repository at this point in the history
The underlying SSL issue appears to be tied to libgit2 library being unable to read a PEM file format, and hence errors. Workaround is to use
  • Loading branch information
rathod-b committed Aug 19, 2024
1 parent 4ec5df9 commit 6789fda
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions julia_src/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ ARG NREL_ROOT_CERT_URL_ROOT=""
RUN set -x && if [ -n "$NREL_ROOT_CERT_URL_ROOT" ]; then curl -fsSLk -o /usr/local/share/ca-certificates/nrel_root.crt "${NREL_ROOT_CERT_URL_ROOT}/nrel_root.pem" && curl -fsSLk -o /usr/local/share/ca-certificates/nrel_xca1.crt "${NREL_ROOT_CERT_URL_ROOT}/nrel_xca1.pem" && update-ca-certificates; fi
ENV REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt

# Use git cli instead of Julia's libgit2, since we're facing SSL issues with it.
RUN apt-get update && apt-get -y install git && rm -rf /var/lib/apt/lists/* /var/lib/dpkg/*-old /var/cache/* /var/log/*
ENV JULIA_PKG_USE_CLI_GIT=true

# Install Julia packages
ENV JULIA_NUM_THREADS=2
ENV XPRESS_JL_SKIP_LIB_CHECK=True
Expand Down

1 comment on commit 6789fda

@rathod-b
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finishing up the commit comment: The underlying SSL issue appears to be tied to libgit2 library being unable to read a PEM file format, and hence errors. Workaround is to use git CLI instead of inbuilt libgit2.

JuliaLang/Pkg.jl#2679
JuliaLang/Pkg.jl#2520 (comment)

Please sign in to comment.