mirror of
https://github.com/BillyOutlast/flash-attention-prebuild-wheels-rocm.git
synced 2026-07-01 01:37:53 -04:00
fix: reorganize Dockerfile user context and dependency installation
- Move WORKDIR before USER directive to follow Docker best practices - Run installdependencies.sh as root user with explicit USER root context - Reorder ENTRYPOINT to the end of the Dockerfile - Remove unnecessary sudo prefix since running as root
This commit is contained in:
@@ -54,12 +54,18 @@ RUN echo '%sudo ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
||||
USER ubuntu
|
||||
WORKDIR /home/ubuntu
|
||||
USER ubuntu
|
||||
|
||||
RUN curl -fsSL -o actions-runner.tar.gz -L "https://github.com/actions/runner/releases/download/v${GH_RUNNER_VERSION}/actions-runner-linux-${TARGET_ARCH}-${GH_RUNNER_VERSION}.tar.gz" \
|
||||
&& tar xf actions-runner.tar.gz \
|
||||
&& rm actions-runner.tar.gz \
|
||||
&& sudo ./bin/installdependencies.sh
|
||||
&& rm actions-runner.tar.gz
|
||||
|
||||
USER root
|
||||
|
||||
RUN ./bin/installdependencies.sh
|
||||
|
||||
USER ubuntu
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user