mirror of
https://github.com/BillyOutlast/flash-attention-prebuild-wheels-rocm.git
synced 2026-07-01 01:37:53 -04:00
feat: update Dockerfile for arm64 build
This commit is contained in:
@@ -52,9 +52,6 @@ RUN usermod -aG sudo ubuntu \
|
||||
# Allow sudo without password
|
||||
RUN echo '%sudo ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
WORKDIR /home/ubuntu
|
||||
USER ubuntu
|
||||
|
||||
@@ -66,6 +63,8 @@ USER root
|
||||
|
||||
RUN ./bin/installdependencies.sh
|
||||
|
||||
USER ubuntu
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
||||
|
||||
@@ -1,11 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
ARCH=$(uname -m)
|
||||
|
||||
if [ "$ARCH" = "aarch64" ]; then
|
||||
echo "Architecture is aarch64 (ARM64). Applying QEMU workarounds..."
|
||||
mkdir -p /etc/docker
|
||||
cat <<EOF > /etc/docker/daemon.json
|
||||
{
|
||||
"iptables": false,
|
||||
"ip6tables": false
|
||||
}
|
||||
EOF
|
||||
fi
|
||||
|
||||
# Start docker daemon
|
||||
sudo service docker start
|
||||
service docker start
|
||||
|
||||
if [ -n "$PERSONAL_ACCESS_TOKEN" ]; then
|
||||
echo "Using personal access token";
|
||||
./config.sh \
|
||||
runuser -u ubuntu -- ./config.sh \
|
||||
--unattended \
|
||||
--url $REPOSITORY_URL \
|
||||
--pat "$PERSONAL_ACCESS_TOKEN" \
|
||||
@@ -16,7 +29,7 @@ if [ -n "$PERSONAL_ACCESS_TOKEN" ]; then
|
||||
--replace;
|
||||
else
|
||||
echo "Using registry token";
|
||||
./config.sh \
|
||||
runuser -u ubuntu -- ./config.sh \
|
||||
--unattended \
|
||||
--url $REPOSITORY_URL \
|
||||
--token "$REGISTRY_TOKEN" \
|
||||
@@ -27,4 +40,4 @@ else
|
||||
--replace;
|
||||
fi
|
||||
|
||||
exec "./run.sh"
|
||||
exec runuser -u ubuntu -- ./run.sh
|
||||
|
||||
Reference in New Issue
Block a user