mirror of
https://github.com/BillyOutlast/flash-attention-prebuild-wheels-rocm.git
synced 2026-07-01 01:27:54 -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
|
# Allow sudo without password
|
||||||
RUN echo '%sudo ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
|
RUN echo '%sudo ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
|
||||||
|
|
||||||
COPY entrypoint.sh /entrypoint.sh
|
|
||||||
RUN chmod +x /entrypoint.sh
|
|
||||||
|
|
||||||
WORKDIR /home/ubuntu
|
WORKDIR /home/ubuntu
|
||||||
USER ubuntu
|
USER ubuntu
|
||||||
|
|
||||||
@@ -66,6 +63,8 @@ USER root
|
|||||||
|
|
||||||
RUN ./bin/installdependencies.sh
|
RUN ./bin/installdependencies.sh
|
||||||
|
|
||||||
USER ubuntu
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
|
RUN chmod +x /entrypoint.sh
|
||||||
|
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,24 @@
|
|||||||
#!/bin/bash
|
#!/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
|
# Start docker daemon
|
||||||
sudo service docker start
|
service docker start
|
||||||
|
|
||||||
if [ -n "$PERSONAL_ACCESS_TOKEN" ]; then
|
if [ -n "$PERSONAL_ACCESS_TOKEN" ]; then
|
||||||
echo "Using personal access token";
|
echo "Using personal access token";
|
||||||
./config.sh \
|
runuser -u ubuntu -- ./config.sh \
|
||||||
--unattended \
|
--unattended \
|
||||||
--url $REPOSITORY_URL \
|
--url $REPOSITORY_URL \
|
||||||
--pat "$PERSONAL_ACCESS_TOKEN" \
|
--pat "$PERSONAL_ACCESS_TOKEN" \
|
||||||
@@ -16,7 +29,7 @@ if [ -n "$PERSONAL_ACCESS_TOKEN" ]; then
|
|||||||
--replace;
|
--replace;
|
||||||
else
|
else
|
||||||
echo "Using registry token";
|
echo "Using registry token";
|
||||||
./config.sh \
|
runuser -u ubuntu -- ./config.sh \
|
||||||
--unattended \
|
--unattended \
|
||||||
--url $REPOSITORY_URL \
|
--url $REPOSITORY_URL \
|
||||||
--token "$REGISTRY_TOKEN" \
|
--token "$REGISTRY_TOKEN" \
|
||||||
@@ -27,4 +40,4 @@ else
|
|||||||
--replace;
|
--replace;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exec "./run.sh"
|
exec runuser -u ubuntu -- ./run.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user