Google Cloud Platform


Hi, I really met a problem, and I don’t know to process…
I used the “gcloud compute ssh –zone=us-west1-b jupyter@my-fastai-instance – -L 8080:localhost:8080”, but it said no jupyter can be recognized, can you help me?

Are you using an instance you created following the steps here? Can you give me a bit more info on your setup? Thanks.

Yes, I followed the steps as the https://course.fast.ai/start_gcp.html. All goes well until the last step. I can’t use the juypter notebook. It cannot be connected. I don’t know why. So I tried many other ways, like https://github.com/arunoda/fastai-shell. It’s very easy, but I met the same problem, just as shown in the picture. Would you mind to communicate with email? My email is caiwangzheng@gmail, I have tried to use google cloud platform to perform fastai for two weeks… I don’t know how to solve it… Really thank you for your reply…

1 Like

I’m sorry, this area isn’t my strength so I may not be the best person to help. Looking very closely at the commands in the first screenshot, it looks like you used only one dash -zone=us-west1-b instead of two dashes --zone=us-west-1b. When I tried it I got a similar error message to yours about unrecognized arguments. Hopefully that helps.

@MadeUpMasters @Timothy_ZHENG, it looks like I’m running into a similar issue to you. I’m looking to launch a jupyter notebook that is connected to a Google Cloud instance. I have followed all the steps in https://course.fast.ai/start_gcp.html, but I keep on getting an error when I issue the gcloud compute ssh command. Any idea what I’m missing here? Thanks!

Error Message:
ssh: connect to host 35.233.250.67 port 22: Resource temporarily unavailable
ERROR: (gcloud.compute.ssh) [/usr/bin/ssh] exited with return code [255].

export IMAGE_FAMILY="pytorch-latest-gpu"
export ZONE="us-west1-b"
export INSTANCE_NAME="fastai-instance"
export INSTANCE_TYPE="n1-highmem-4" 

gcloud compute instances create $INSTANCE_NAME \
        --zone=$ZONE \
        --image-family=$IMAGE_FAMILY \
        --image-project=deeplearning-platform-release \
        --maintenance-policy=TERMINATE \
        --accelerator="type=nvidia-tesla-k80,count=1" \
        --machine-type=$INSTANCE_TYPE \
        --boot-disk-size=200GB \
        --metadata="install-nvidia-driver=True" \
        --preemptible

export ZONE="us-west1-b"
export INSTANCE_NAME="fastai-instance"
gcloud compute ssh --zone=$ZONE jupyter@$INSTANCE_NAME -- -L 8080:localhost:8080

I think this means there are no premptible instances available. You can try again later, that might work

I am sorry but I haven’t solved this problem. I am struggling with it. We can communicate if I solve it

Continuing the discussion from Google Cloud Platform:

[quote=“floristco, post:38, topic:35907, full:true”]
I think this means there are no premptible instances available. You can try again later, that might work
[/quote]

It all seems good, but I can’t open the Jupyter Notebook

It seems good, but I still can’t open the Jupyter Notebook

If you connect with gccloud jupyter notebook is already running and routed to your localhost. You should see your notebook here: localhost:8080/

@floristco - I tried without the premptible and still get the same error. Any other ideas? Thanks!

I was trying to boot my gcloud preemptible VM, but before the VM properly boots up and I start my Jupyter Notebook, the VM gets auto shut down due to the preemptibe option. Did anyone else feel the same? My VM is in the US West region.

I am seeing an issue with preemptible instances as well. As soon as I add the --preemptible flag, the instance does not start
ERROR: (gcloud.compute.instances.create) Could not fetch resource:

  • Instance failed to start due to preemption.

If I remove the flag, the instance starts ok. Its more expensive though. Why does the preemptible instance not start up? Any help is appreciated. Thanks

Preemptible instance means it will use whatever resources are available in that area but priority is placed on non-preemptible resources. It’s effectively what other extra resources that are available are given to you. But sometimes there are no extra idle resources:

A preemptible VM is an instance that you can create and run at a much lower price than normal instances. However, Compute Engine might terminate (preempt) these instances if it requires access to those resources for other tasks. Preemptible instances are excess Compute Engine capacity, so their availability varies with usage.

(From GCP help page)

1 Like

I have same problem.

I think it is because google doesn’t allow us to do so with free tier. See below:

Preemptible instance limitations

Preemptible instances function like normal instances but have the following limitations:


From Google Website: https://cloud.google.com/compute/docs/instances/preemptible

Preemptible instance limitations

Preemptible instances function like normal instances but have the following limitations:

Thank you @Harvey. I was trying to use my free credits. It seems this condition was added recently bcz for Part 1 2019, I was able to run a preemptible instance with the free credits.

Thanks again.

I’ve been having problems creating a vm instance using the recommended machine type and GPU as described here in the tutorial:

However I get the following error:
n2-highmem-8, nvidia-tesla-p100] features are not compatible for creating instance.

I cannot find any documentation on GCP about what machine types and GPUs are compatible. Has any one else encountered this problem?

1 Like

Hi ,
Creating using the blow command doesn’t work, because :
ERROR: (gcloud.compute.instances.create) Could not fetch resource:

export IMAGE_FAMILY="pytorch-latest-gpu" # or "pytorch-latest-cpu" for non-GPU instances
export ZONE="us-west1-b"
export INSTANCE_NAME="my-fastai-instance"
export INSTANCE_TYPE="n2d-highmem-8" # budget: "n2d-highmem-4"

# budget: 'type=nvidia-tesla-T4,count=1'
gcloud compute instances create $INSTANCE_NAME \
        --zone=$ZONE \
        --image-family=$IMAGE_FAMILY \
        --image-project=deeplearning-platform-release \
        --maintenance-policy=TERMINATE \
        --accelerator="type=nvidia-tesla-p100,count=1" \
        --machine-type=$INSTANCE_TYPE \
        --boot-disk-size=200GB \
        --metadata="install-nvidia-driver=True" \
        --preemptible
1 Like

Hey Nick - did you find a solution for this? I’m running into the same problem now…