Run your project on Floyd.
floyd run [OPTIONS] [COMMAND]
||cpu||If specified, runs the job on a GPU (G1) instance or CPU (C1) instance. See instance specifications on the pricing page.|
||command||Specify the mode you want to run the project. The default behavior executes the command you specify. See jupyter and serve sections for more info on them.|
||You can disable the CLI from opening the jupyter notebook url. It will print the URL instead.|
||keras:py3||Specify the environment you want to use for your project. See environments for the full list.|
||Attach a message to the specific run of the project.|
||Starts tensorboard in the environment. Tensorboard URL can be found in the dashboard.|
|command||Command to execute when running your project on Floyd.|
$ floyd run --env tensorflow --gpu "python mnist_cnn.py" Syncing code ... NAME ----------------------------- floydhub/projects/lung-cancer/2 ... $ floyd logs floydhub/projects/lung-cancer/2
Floyd runs standard Docker images for various deep learning frameworks.(See environments for details). If your
code requires additional Python dependencies you can specify them in a
floyd_requirements.txt file and place it at the root
directory of your project. These dependencies will be installed before running your code.
$ cat floyd_requirements.txt Pillow scipy $ floyd run "python train_tf.py -lr 0.01 -output /output/model.bin"
Floyd supports running Jupyter/iPython notebooks on the server. Make sure that the notebook (.ipynb) files are present in the
current directory. Use
--mode jupyter and you will be presented with a URL to view your Jupyter environment. You do not need
to specify a command in this mode. See jupyter page for more details.
$ floyd run --mode jupyter ... Path to jupyter notebook: https://www.floydhub.com/notebooks/g8uGRZFQz85meArJGToEcs
Attaching multiple datasets¶
You can attach upto 5 datasets when you run a project using the run command. You can specify both datasets you uploaded and output datasets of your previous runs. You can specify the mount point also when you specify the data id to mount.
$ floyd run --data udacity/datasets/celeba/1:training --data udacity/datasets/mnist/1:testing "python script.py"
Floyd can be used to host the model you generated as a REST api. This api can be used to evaluate your model over HTTP.
--mode serve and you will be presented with a URL to access your API. Floyd currently supports only Flask apps.
It runs app.py file and expects the service to run on port 5000. You do not need to specify a command in this mode.
See serve page for more details.
$ floyd run --mode serve ... URL to service endpoint: https://www.floydlabs.com/expose/mkxjJa46aJBdwP4AEdKxfU
Help make this document better¶
This guide, as well as the rest of our docs, are open-source and available on GitHub. We welcome your contributions.
- Suggest an edit to this page (by clicking the edit icon at the top next to the title).
- Open an issue about this page to report a problem.