Created
February 3, 2022 20:00
-
-
Save shenoy-anurag/e501fbef1ba551b04404a3e173533aa8 to your computer and use it in GitHub Desktop.
Builds keras-dev container for arm64 / aarch64 systems
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:3.9 | |
# https://code.visualstudio.com/docs/remote/containers-advanced#_creating-a-nonroot-user | |
ARG USERNAME=keras-vscode | |
ARG USER_UID=1000 | |
ARG USER_GID=$USER_UID | |
# Create the user | |
RUN groupadd --gid $USER_GID $USERNAME \ | |
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \ | |
# | |
# [Optional] Add sudo support. Omit if you don't need to install software after connecting. | |
&& apt-get update \ | |
&& apt-get install -y sudo bash \ | |
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ | |
&& chmod 0440 /etc/sudoers.d/$USERNAME | |
# Nano (to make my life easier) | |
RUN sudo apt install nano -y | |
# Install Bazel arm64 | |
RUN sudo apt update | |
RUN wget https://github.com/bazelbuild/bazel/releases/download/4.2.1/bazel-4.2.1-linux-arm64 | |
RUN sudo mkdir /usr/local/bin/bazel | |
RUN sudo mv bazel-4.2.1-linux-arm64 /usr/local/bin/bazel | |
RUN sudo chmod +x /usr/local/bin/bazel/bazel-4.2.1-linux-arm64 | |
RUN export PATH="$PATH:/usr/local/bin/bazel" | |
RUN echo 'export PATH="$PATH:/usr/local/bin/bazel"' >> ~/.bashrc | |
RUN sudo ln -s /usr/local/bin/bazel/bazel-4.2.1-linux-arm64 /usr/bin/bazel | |
RUN sudo bazel | |
USER $USERNAME | |
ENV PATH="/home/$USERNAME/.local/bin:${PATH}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment