0

On the AppEnginer based Cloud-Datalab you did not need to set up project since it was already set up.

On the new version based on docker, the documentation and tutorials seems to assume that the project is already set up, but once you run storage comments API or magic functions, then an error pops.

I can make it work by manually adding %%projects set <proj_d>. I wonder if this is an issue with incomplete documentation (typical with GCP documentation) or if somehow my container running datalab broke down or I did not set it up correctly.

1 Answers1

1

My understanding is that if you set the environment variable PROJECT_ID when using the docker run... -e "PROJECT_ID=<your-project>"... command, then you don't need to use %%projects set <project_id> . I have been using datalab for a while now and rarely use %%projects set <project_id> (only when I actually want to switch to another project). I followed the quick-start documentation.

From the Datalab quick-start documentation,

In a terminal window, launch the datalab Docker container. Type your project ID in place of the placeholder shown below. Cloud Datalab will create a /datalab directory in your home directory, and will access this directory to read/write notebooks, data files, tutorials, and samples. docker run -it -p "127.0.0.1:8081:8080" -v "${HOME}:/content" -e "PROJECT_ID=<PROJECT_ID>" gcr.io/cloud-datalab/datalab:local

To check for updates to the Datalab image, use the following command:

docker pull gcr.io/cloud-datalab/datalab:local
Anthonios Partheniou
  • 1,699
  • 1
  • 15
  • 25
  • 1
    I am creating my containers with the the "PROJECT_ID=..." for the local execution case but not for the GCE gateway VM case, somehow that was omitted in the documentation. I will update my container generator to indicate this. This explains to me why it was needed and one case and not in the other. (Thanks Anthonios) – Jose Celaya Sep 12 '16 at 23:47