-
Notifications
You must be signed in to change notification settings - Fork 105
Add TeX Live and Pandoc installation for ppc64le #1179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 7 commits
9211d51
38b91c3
7184ab0
c5eb49a
1c8cc56
8d3b3e5
2ca6f7d
fd58c51
b009cdd
f124aa1
510e5a0
6673212
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
set -euxo pipefail | ||
|
||
ARCH=$(uname -m) | ||
|
||
if [[ "$ARCH" == "ppc64le" ]]; then | ||
# Install Pandoc from source | ||
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm | ||
dnf install -y cabal-install ghc gmp-devel | ||
|
||
Comment on lines
+15
to
+17
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
- dnf install -y cabal-install ghc gmp-devel
+ dnf install -y git cabal-install ghc gmp-devel
…
- dnf remove -y cabal-install ghc gmp-devel
+ dnf remove -y git cabal-install ghc gmp-devel 🤖 Prompt for AI Agents
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we don't run from ubi9 minimal, we use s2i python image here, so git is present it may be a good idea to install it explicitly, just in case we ever want to leave s2i but that's not work for this PR There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jiridanek Thank you for the clarification! You're absolutely right - I missed that this is running on the s2i Python image where git is already available, not the minimal UBI9 base. I appreciate the context about the base image and the future-proofing consideration. The suggestion to explicitly install git makes sense for when/if you transition away from s2i, but as you noted, that's outside the scope of this PR. ✏️ Learnings added
|
||
# Set version | ||
PANDOC_VERSION=3.7.0.2 | ||
|
||
cd /tmp | ||
git clone --recurse-submodules https://github.com/jgm/pandoc.git | ||
cd pandoc | ||
git checkout ${PANDOC_VERSION} | ||
git submodule update --init --recursive | ||
|
||
cabal update | ||
cd pandoc-cli | ||
cabal build -j$(nproc) | ||
cabal install --installdir=/usr/local --overwrite-policy=always --install-method=copy | ||
puneetsharma21 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
# Clean up Haskell build system | ||
rm -rf ~/.cabal ~/.ghc /tmp/pandoc | ||
dnf remove -y cabal-install ghc gmp-devel | ||
dnf clean all && rm -rf /var/cache/dnf | ||
fi | ||
|
||
if [[ "$ARCH" == "x86_64" ]]; then | ||
# pandoc installation | ||
curl -L https://github.com/jgm/pandoc/releases/download/3.7.0.2/pandoc-3.7.0.2-linux-amd64.tar.gz -o /tmp/pandoc.tar.gz | ||
mkdir -p /usr/local/pandoc | ||
tar xvzf /tmp/pandoc.tar.gz --strip-components 1 -C /usr/local/pandoc/ | ||
rm -f /tmp/pandoc.tar.gz | ||
fi | ||
|
||
/usr/local/pandoc --version | ||
puneetsharma21 marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!/bin/bash | ||
set -euxo pipefail | ||
|
||
ARCH=$(uname -m) | ||
|
||
if [[ "$ARCH" == "ppc64le" ]]; then | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
echo "Installing TeX Live from source for $ARCH" | ||
|
||
# Download and extract source | ||
wget https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/2025/texlive-20250308-source.tar.xz | ||
tar -xf texlive-20250308-source.tar.xz | ||
cd texlive-20250308-source | ||
|
||
# Install build dependencies | ||
dnf install -y gcc-toolset-13 perl make libX11-devel libXt-devel \ | ||
zlib-devel freetype-devel libpng-devel ncurses-devel \ | ||
gd-devel libtool wget tar xz bison flex libXaw-devel | ||
|
||
source /opt/rh/gcc-toolset-13/enable | ||
|
||
# Create build directory | ||
mkdir ../texlive-build | ||
cd ../texlive-build | ||
|
||
# Configure, build, install | ||
../texlive-20250308-source/configure --prefix=/usr/local/texlive | ||
make -j$(nproc) | ||
make install | ||
|
||
# Symlink for pdflatex | ||
cd /usr/local/texlive/bin/powerpc64le-unknown-linux-gnu | ||
ln -s pdftex pdflatex | ||
|
||
# Cleanup TeX source to reduce image size | ||
rm -rf /texlive-20250308-source /texlive-build | ||
|
||
export PATH="/usr/local/texlive/bin/powerpc64le-unknown-linux-gnu:$PATH" | ||
pdflatex --version | ||
fi | ||
|
||
if [[ "$ARCH" == "x86_64" ]]; then | ||
# tex live installation | ||
echo "Installing TexLive to allow PDf export from Notebooks" | ||
curl -L https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz -o install-tl-unx.tar.gz | ||
zcat < install-tl-unx.tar.gz | tar xf - | ||
cd install-tl-2* | ||
perl ./install-tl --no-interaction --scheme=scheme-small --texdir=/usr/local/texlive | ||
cd /usr/local/texlive/bin/x86_64-linux | ||
./tlmgr install tcolorbox pdfcol adjustbox titling enumitem soul ucs collection-fontsrecommended | ||
fi | ||
|
Uh oh!
There was an error while loading. Please reload this page.