waymo-open-dataset icon indicating copy to clipboard operation
waymo-open-dataset copied to clipboard

error when running `docker build --tag=open_dataset_jupyter -f tutorial/cpu-jupyter.Dockerfile .`

Open qzhang-nuro opened this issue 2 years ago • 3 comments

Hi, I am following the command in /tutorial/tutorial_local.ipynb and when I run docker build --tag=open_dataset_jupyter -f tutorial/cpu-jupyter.Dockerfile . there will be the following error

can't load package: package github.com/bazelbuild/bazelisk@latest: cannot find package "github.com/bazelbuild/bazelisk@latest" in any of:
        /usr/lib/go-1.10/src/github.com/bazelbuild/bazelisk@latest (from $GOROOT)
        /root/go/src/github.com/bazelbuild/bazelisk@latest (from $GOPATH)

is this a go issue? how should I change the docker file to resolve it?

qzhang-nuro avatar Aug 03 '23 20:08 qzhang-nuro

Hi, is there any update on this @alexgorban, @alexzzhu?

konsgken avatar Oct 22 '23 20:10 konsgken

Hi, sorry for the very delayed response.

The tutorial/cpu-jupyter.Dockerfile is out-of-date and will not work with our new bazel build config. We need to update it to be based on pip_pkg_scripts/build.Dockerfile

Meanwhile, if you just need a container with a local jupyter kernel I'd suggest to replace CMD [] in the end of pip_pkg_scripts/build.Dockerfile with

EXPOSE 8888
RUN python3 -m ipykernel.kernelspec

CMD ["bash", "-c", "source /etc/bash.bashrc && bazel run -c opt //waymo_open_dataset/tutorial:jupyter_kernel"]

alexgorban avatar Oct 30 '23 18:10 alexgorban

I am having some issues when trying to run locally. Particularly, I cant seem to build docker container (Step 2 in tutorial_local.ipynb). When I run the following command line:

docker build --tag=open_dataset_jupyter -f tutorial/cpu-jupyter.Dockerfile ..

Output:

[+] Building 0.6s (7/12)                                   docker:desktop-linux
 => [internal] load build definition from cpu-jupyter.Dockerfile           0.0s
 => => transferring dockerfile: 744B                                       0.0s
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
 => [internal] load metadata for docker.io/tensorflow/tensorflow:latest-p  0.3s
 => [1/9] FROM docker.io/tensorflow/tensorflow:latest-py3@sha256:14ec674c  0.0s
 => CACHED [2/9] RUN apt-get update && apt-get install -y   git build-ess  0.0s
 => CACHED [3/9] RUN apt-get install -y wget golang                        0.0s
 => ERROR [4/9] RUN go install github.com/bazelbuild/bazelisk@latest       0.2s
------                                                                          
 > [4/9] RUN go install github.com/bazelbuild/bazelisk@latest:                  
0.232 can't load package: package github.com/bazelbuild/bazelisk@latest: cannot find package "github.com/bazelbuild/bazelisk@latest" in any of:                 
0.232   /usr/lib/go-1.10/src/github.com/bazelbuild/bazelisk@latest (from $GOROOT)
0.232 	/root/go/src/github.com/bazelbuild/bazelisk@latest (from $GOPATH)
------
cpu-jupyter.Dockerfile:8
--------------------
   6 |     
   7 |     RUN apt-get install -y wget golang
   8 | >>> RUN go install github.com/bazelbuild/bazelisk@latest
   9 |     
  10 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c go install github.com/bazelbuild/bazelisk@latest" did not complete successfully: exit code: 1

Any suggestions on how to proceed? Am new to Bazel and Docker. If you can point me to the right direction, that would be helpful as well. Thanks

ralbal avatar Nov 11 '23 03:11 ralbal