-
Notifications
You must be signed in to change notification settings - Fork 117
Add s390x Support for Codeserver Notebook #2573
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
Changes from 1 commit
ba90cf7
378ca89
cee68f3
cf02a2f
94bbd4a
fd7806f
aef045c
9db3af0
63443ba
9251d2c
7f16bc0
568d153
c4e023b
de95627
1a0745f
7c271a1
238239f
5fbda4c
85ec054
7524edb
b5bc29b
77bc0d8
55474c7
544b205
7641b8e
50c88d0
e4f5f2a
4ad8a94
f24ceb6
33a215a
0f25602
fd01ea0
cb9927e
39fd498
6ba8ea2
da11c87
e80087e
a3118ad
fd69f05
d540a31
684520f
1068b76
28e3c30
468bc13
7081887
a4a9da3
94fcc41
8290038
e93723d
d8c7295
daa8928
adad3d0
6ca37ec
dbe95b2
253eddc
8f013d4
9805dba
5a387a6
2e3b8b2
238a61f
f655b3a
85da881
c99f76e
7580c21
9f55bee
86cc35a
3163bfa
937ce68
7a652f5
fb04201
a0be939
50fb52c
3b842da
bd1331b
d3aaa88
2ba0424
6b5a294
c8e3b28
284afac
6adbb06
c5e0e77
f1db72b
90f6d3d
c8f5aa5
0907c35
e8eb7ff
248e7ec
28c0d6e
1c4520e
59d1d2e
12dd548
5b5607c
4bd32f4
553a17f
8232040
fbd924a
208981a
89524c3
21e94bd
dce103f
86f258a
d39defa
a680a71
0e7b08f
44ec719
d349e89
77e39a2
835214d
9b71332
b582f60
4b85f74
efaeb98
857f86d
a08ff25
304854c
410350a
3a59e5e
1aa0540
3ded715
8e6c5b8
af1c490
132478f
c624fcd
9461d37
eff39ef
2c17048
1cb2d50
39ca491
ea4a62f
b43e4d7
38b96e4
ccd100b
7e259e8
f3ccc56
c43026b
41b4b85
c643233
3203a22
7c50be3
37822d5
a3d61ca
c5f23fc
e6e4cf3
04545b1
1a8a9e2
93ff41b
113e534
89dc8f2
34b7e9f
e71bae0
f01c3a7
71238e0
a69dde0
93c7a65
a1f95bf
8fe8298
cef8ab5
b6ee3d3
bd5fd73
4809d6c
9795eaa
a519c38
493fa4d
0b5663a
6900e51
4225989
642b66a
d2bf9b5
b9278f6
4d535a3
e5de9d6
012350d
daf39eb
ad09932
87d4c90
94364dd
781485b
b24e39d
9112dd4
a6af42f
0df1205
396297b
719cda5
5bb0fdd
4e04b52
e150706
290486c
058721f
524cdc2
bf43359
c90b266
98f8d09
3c25e2a
663f280
9f5f8c4
293e091
dd608cd
0691fd9
56be462
759dada
7c49f8b
5b6f51d
b564eac
a9cad40
de1efcc
34ab083
2ecd163
117517c
51c16f4
fb3d14f
a4554e4
ed16e03
05bb01a
d371255
d73fe9c
6949e35
932e04d
7cf09b6
6584846
94e9b8d
889d0c8
43639c6
001b1e3
1db6576
274503e
504bf4a
812fdc4
3f412d2
d31ddcb
e5446d1
bb33e9e
d2fb5b0
7419b52
482f958
9573142
2e6560d
a1287e8
3df7965
9303cf2
da3d71c
a00d9f0
da4551a
9ec4b0a
524a0d5
799662d
fba94e8
7e10a27
9ded38f
1470a8a
3a48dd4
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 | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -63,6 +63,35 @@ build_pyarrow() { | |||||||||||||||
rm -rf ${TEMP_BUILD_DIR} | ||||||||||||||||
} | ||||||||||||||||
|
||||||||||||||||
# Additional dev tools only for s390x \ | ||||||||||||||||
if [[ $(uname -m) == "s390x" ]]; then \ | ||||||||||||||||
|
||||||||||||||||
dnf install -y perl mesa-libGL skopeo libxcrypt-compat python3.12-devel pkgconf-pkg-config gcc gcc-gfortran gcc-c++ ninja-build make openssl-devel python3-devel pybind11-devel autoconf automake libtool cmake openblas-devel libjpeg-devel zlib-devel libtiff-devel freetype-devel lcms2-devel libwebp-devel git tar wget | ||||||||||||||||
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm | ||||||||||||||||
dnf install -y cmake gcc gcc-toolset-13 fribidi-devel lcms2-devel && \ | ||||||||||||||||
openjpeg2-devel libraqm-devel libimagequant-devel tcl-devel tk-devel && \ | ||||||||||||||||
dnf clean all && rm -rf /var/cache/dnf; | ||||||||||||||||
Comment on lines
+71
to
+73
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. Broken dnf install chain on s390x. The second line starts with package names, not a command. This will fail with “command not found”. Fix by consolidating packages and cleaning cache: - dnf install -y cmake gcc gcc-toolset-13 fribidi-devel lcms2-devel && \
- openjpeg2-devel libraqm-devel libimagequant-devel tcl-devel tk-devel && \
- dnf clean all && rm -rf /var/cache/dnf;
+ dnf install -y \
+ cmake gcc gcc-toolset-13 fribidi-devel lcms2-devel \
+ openjpeg2-devel libraqm-devel libimagequant-devel tcl-devel tk-devel
+ dnf clean all && rm -rf /var/cache/dnf 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||||||||||||
|
||||||||||||||||
# install rust | ||||||||||||||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | ||||||||||||||||
|
||||||||||||||||
source /opt/rh/gcc-toolset-13/enable | ||||||||||||||||
source "$HOME/.cargo/env" | ||||||||||||||||
|
||||||||||||||||
export MAX_JOBS=${MAX_JOBS:-$(nproc)} | ||||||||||||||||
|
||||||||||||||||
if [[ $(uname -m) == "s390x" ]]; then | ||||||||||||||||
echo "Checking OpenBLAS pkg-config..." | ||||||||||||||||
pkg-config --exists openblas || echo "Warning: openblas.pc not found" | ||||||||||||||||
fi | ||||||||||||||||
|
||||||||||||||||
export CMAKE_ARGS="-DPython3_EXECUTABLE=python -DCMAKE_PREFIX_PATH=/usr/local" | ||||||||||||||||
|
||||||||||||||||
PYARROW_VERSION=$(grep -A1 '"pyarrow"' pylock.toml | grep -Eo '\b[0-9\.]+\b') | ||||||||||||||||
build_pyarrow ${PYARROW_VERSION} | ||||||||||||||||
uv pip install ${WHEEL_DIR}/*.whl | ||||||||||||||||
fi | ||||||||||||||||
|
||||||||||||||||
if [[ $(uname -m) == "ppc64le" ]]; then | ||||||||||||||||
# install development packages | ||||||||||||||||
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm | ||||||||||||||||
|
@@ -101,7 +130,8 @@ if [[ $(uname -m) == "ppc64le" ]]; then | |||||||||||||||
build_pillow ${PILLOW_VERSION} | ||||||||||||||||
|
||||||||||||||||
uv pip install ${WHEEL_DIR}/*.whl | ||||||||||||||||
else | ||||||||||||||||
# only for mounting on non-ppc64le | ||||||||||||||||
mkdir -p /root/OpenBLAS/ | ||||||||||||||||
fi | ||||||||||||||||
if [[ $(uname -m) != "ppc64le" ]] && [[ $(uname -m) != "ppc64le" ]]; then | ||||||||||||||||
# only for mounting on other than s390x and ppc64le | ||||||||||||||||
mkdir -p /root/OpenBLAS/ | ||||||||||||||||
fi | ||||||||||||||||
Comment on lines
+134
to
137
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. Typo in arch condition; s390x not excluded. The condition checks ppc64le twice. s390x hosts will incorrectly create /root/OpenBLAS/. -if [[ $(uname -m) != "ppc64le" ]] && [[ $(uname -m) != "ppc64le" ]]; then
+if [[ $(uname -m) != "ppc64le" ]] && [[ $(uname -m) != "s390x" ]]; then
# only for mounting on other than s390x and ppc64le
mkdir -p /root/OpenBLAS/
fi 🤖 Prompt for AI Agents
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ UNAME_TO_GOARCH["s390x"]="s390x" | |
|
||
ARCH="${UNAME_TO_GOARCH[$(uname -m)]}" | ||
|
||
if [[ "$ARCH" == "amd64" || "$ARCH" == "arm64" ||"$ARCH" == "ppc64le" ]]; then | ||
if [[ "$ARCH" == "amd64" || "$ARCH" == "arm64" ||"$ARCH" == "ppc64le" || "$ARCH" == "s390x" ]]; then | ||
|
||
export MAX_JOBS=${MAX_JOBS:-$(nproc)} | ||
export NODE_VERSION=${NODE_VERSION:-22.18.0} | ||
|
@@ -62,12 +62,57 @@ if [[ "$ARCH" == "amd64" || "$ARCH" == "arm64" ||"$ARCH" == "ppc64le" ]]; then | |
# build codeserver | ||
git clone --depth 1 --branch "${CODESERVER_VERSION}" --recurse-submodules --shallow-submodules https://github.com/coder/code-server.git | ||
cd code-server | ||
|
||
#patch taken from vscodium s390x IBM | ||
if [[ "$ARCH" == "s390x" ]]; then | ||
cat > s390x.patch <<EOL | ||
diff --git a/lib/vscode/package-lock.json b/lib/vscode/package-lock.json | ||
index 0d0272a92b2..73e8feb92dd 100644 | ||
--- a/lib/vscode/package-lock.json | ||
+++ b/lib/vscode/package-lock.json | ||
@@ -18236,10 +18236,11 @@ | ||
} | ||
}, | ||
"node_modules/web-tree-sitter": { | ||
- "version": "0.20.8", | ||
- "resolved": "https://registry.npmjs.org/web-tree-sitter/-/web-tree-sitter-0.20.8.tgz", | ||
- "integrity": "sha512-weOVgZ3aAARgdnb220GqYuh7+rZU0Ka9k9yfKtGAzEYMa6GgiCzW9JjQRJyCJakvibQW+dfjJdihjInKuuCAUQ==", | ||
- "dev": true | ||
+ "version": "0.23.0", | ||
+ "resolved": "https://registry.npmjs.org/web-tree-sitter/-/web-tree-sitter-0.23.0.tgz", | ||
+ "integrity": "sha512-p1T+ju2H30fpVX2q5yr+Wv/NfdMMWMjQp9Q+4eEPrHAJpPFh9DPfI2Yr9L1f5SA5KPE+g1cNUqPbpihxUDzmVw==", | ||
+ "dev": true, | ||
+ "license": "MIT" | ||
}, | ||
"node_modules/webidl-conversions": { | ||
"version": "3.0.1", | ||
diff --git a/lib/vscode/package.json b/lib/vscode/package.json | ||
index a4c7a2a3a35..d7f816248af 100644 | ||
--- a/lib/vscode/package.json | ||
+++ b/lib/vscode/package.json | ||
@@ -227,6 +227,9 @@ | ||
"node-gyp-build": "4.8.1", | ||
"[email protected]": { | ||
"node-addon-api": "7.1.0" | ||
+ }, | ||
+ "@vscode/[email protected]": { | ||
+ "web-tree-sitter": "0.23.0" | ||
} | ||
}, | ||
"repository": { | ||
EOL | ||
|
||
git apply s390x.patch | ||
fi | ||
|
||
source ${NVM_DIR}/nvm.sh | ||
while IFS= read -r src_patch; do echo "patches/$src_patch"; patch -p1 < "patches/$src_patch"; done < patches/series | ||
nvm use ${NODE_VERSION} | ||
npm cache clean --force | ||
npm install | ||
npm run build | ||
VERSION=${CODESERVER_VERSION/v/} npm run build:vscode | ||
export KEEP_MODULES=1 | ||
npm run release | ||
npm run release:standalone | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion | 🟠 Major
Guard wheel install when directory is empty.
Bare glob can fail if
/wheelsdir
has no wheels for a given arch. Add a presence check.📝 Committable suggestion
🤖 Prompt for AI Agents