1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Ubuntu 20.04 に何も考えずにbazelをインストールする

Posted at

tensorflow 系のエコシステムを利用しているとbazelを入れてくれというメッセージが出ることがあって、結構インストールするのがめんどくさいので何も考えずUbuntu 20.04においてbazelをインストールする方法を記載しておく。

  • localhost
$ sudo apt install curl gnupg
$ curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor > bazel.gpg
$ sudo mv bazel.gpg /etc/apt/trusted.gpg.d/
$ echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list

$sudo apt update && sudo apt install bazel
$ bazel --version
  • dockerfile
# bazel
WORKDIR /tmp
RUN apt install curl gnupg
RUN curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor > bazel.gpg
RUN mv bazel.gpg /etc/apt/trusted.gpg.d/
RUN echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | tee /etc/apt/sources.list.d/bazel.list
RUN apt update && apt install bazel

参考URL:
https://gist.github.com/diegopacheco/10f4d7be75574e53e91c49f19bf2613f

公式URL:
https://bazel.build/?hl=ja

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?