adapting for raspberry pi

This commit is contained in:
Aitzol Berasategi 2025-06-23 10:53:47 +02:00
parent 475271ca56
commit 024fddea2c
4 changed files with 30 additions and 4 deletions

View File

@ -13,11 +13,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libssl-dev \ libssl-dev \
clang clang
RUN ln -s /usr/bin/python3 /usr/bin/python & \
ln -s /usr/bin/pip3 /usr/bin/pip
WORKDIR /scratch WORKDIR /scratch
COPY script/wasm-deps.sh . COPY script/wasm-deps.sh .
RUN chmod a+x ./wasm-deps.sh && sleep 1 && ./wasm-deps.sh RUN chmod a+x ./wasm-deps.sh && sleep 1 && ./wasm-deps.sh
RUN ln -s /usr/bin/python3 /usr/bin/python & \
ln -s /usr/bin/pip3 /usr/bin/pip
WORKDIR /app WORKDIR /app

View File

@ -1 +1 @@
nightly-2024-07-19 nightly-2024-08-30

View File

@ -54,7 +54,7 @@ pub fn create(
Ok(_) => ValidationErrors::new(), Ok(_) => ValidationErrors::new(),
Err(e) => e, Err(e) => e,
}; };
let user = User::login(&conn, &form.email_or_name, &form.password); let user = User::login(&conn, &form.email_or_name.to_lowercase(), &form.password);
let user_id = if let Ok(user) = user { let user_id = if let Ok(user) = user {
user.id.to_string() user.id.to_string()
} else { } else {

25
wasm-deps.sh Normal file
View File

@ -0,0 +1,25 @@
#!/bin/bash
ARCH=$(python <<EOF
from __future__ import print_function
import platform
processor = platform.machine()
architecture = platform.architecture()
if processor == 'aarch64':
# Mutli arch arm support is why this 32bit check is present
if '32bit' in architecture:
print('armv71', end='')
else:
print('aarch64', end='')
elif processor == 'x86 64' or processor == 'x86_64':
print('amd64', end='')
elif processor == 'armv7l':
print('armhf', end='')
EOF
)
echo "Detected arch: $ARCH"
if [ $ARCH == "aarch64" -o $ARCH == "armv71" ] ; then
apt-get install -y --no-install-recommends build-essential cmake llvm lld
fi