tensorflow / swift

Swift for TensorFlow
https://tensorflow.org/swift
Apache License 2.0
6.12k stars 608 forks source link

GCP image #472

Closed sinamoeini closed 3 years ago

sinamoeini commented 4 years ago

Hi Team,

Since swift for tensorflow has a new release every couple of months, it would be great if you could provide a GCP disk image alongside like python TensorFlow. This is very helpful for those of us who use google cloud platform.

Thanks!

texasmichelle commented 4 years ago

Hi Sina! Just to confirm your request - are you referring to a machine image like these, the Deep Learning VMs?

sinamoeini commented 4 years ago

Hi Michelle. Yes that’s it. Thanks.

texasmichelle commented 4 years ago

I agree that having an S4TF version of these images would be great! I've added this request to the DLVM team's queue. In the meantime, you can use this script to install the S4TF toolchain on a GCE instance with a stock Ubuntu 18.04 image.

texasmichelle commented 4 years ago

You could automate setup with something like this:

mkdir -p ~/repos/tensorflow
git clone https://github.com/tensorflow/swift.git ~/repos/tensorflow/swift
sudo ~/repos/tensorflow/swift/utils/install-ubuntu1804.sh \
  --toolchain-url https://storage.googleapis.com/swift-tensorflow-artifacts/releases/v0.9/rc1/swift-tensorflow-RELEASE-0.9-ubuntu18.04.tar.gz
export PATH="${HOME}/swift-toolchain/usr/bin:$PATH"
sinamoeini commented 4 years ago

Thank you very much!

texasmichelle commented 3 years ago

Good news! A DLVM image with S4TF for CPU and CUDA 11 will be released as experimental next week 🎉

texasmichelle commented 3 years ago

I will update this thread with the gcloud command once it's live.

texasmichelle commented 3 years ago

A set of S4TF experimental DLVM images are now live 🚀 To find them, run:

gcloud compute images list --project deeplearning-platform-release --no-standard-images | grep swift

As an example of how to create a small GCE instance using the cpu image:

gcloud compute instances create s4tf-ubuntu \
  --image-project=deeplearning-platform-release \
  --image-family=swift-latest-cpu-ubuntu-1804 \
  --maintenance-policy=TERMINATE \
  --machine-type=n1-standard-2 \
  --boot-disk-size=256GB

I will add this to our docs in a bit more detail.

texasmichelle commented 3 years ago

Docs additions here: https://github.com/tensorflow/swift/pull/548