Skip to content

Commit 571ee8f

Browse files
committed
update readme and quickstart
1 parent 69ea7e7 commit 571ee8f

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

README.md

+29-1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ The project is fully Dockerized via the [swift-tensorflow](https://github.com/za
4444

4545
More information on the base docker image and avanced usage examples can be found in its [README](https://github.com/zachgrayio/swift-tensorflow/blob/master/README.md).
4646

47+
* Note: The initial Docker build may take some time; Docker needs to download intermediate layers for the Ubuntu16 image if you haven't used it previously. However, subsequent builds should complete in under 10 seconds on a reasonable machine.*
48+
4749
### Swift Package Manager
4850

4951
This project template is a [Swift Package Manager](https://swift.org/package-manager/) project - `Package.swift` defines the runnable application, the core library, and third-party dependencies.
@@ -70,10 +72,36 @@ rm -rf .git
7072
git init && git commit -am "initial"
7173
```
7274

75+
## The Easy Way
76+
77+
Users on macOS and Linux can take advantage of the supplied run script for easy usage - no Docker required!
78+
79+
### 1) Build and Run with Hot Reload enabled
80+
81+
After cloning, you can start the project in a single command using the `sts` executable that's included:
82+
83+
```bash
84+
./sts run app --build --live
85+
```
86+
87+
After this, any changes you make to the project will result in the Swift code being rebuilt in the container and the executable started. You can exit with `CTRL+C`.
88+
89+
### 2) Add your Swift TensorFlow code
90+
91+
* Add your Swift source files to the to `Sources/STSLibary` directory
92+
* If you'd like them to be part of the runnable application, add the appropriate calls to the `run()` method of `Application.swift`. Assuming you wire up valid code, you'll see your output.
93+
* If you'd rather just run the REPL, `CTRL-C` out of this session and run `./sts run repl --build`
94+
95+
That's it! However, it's recommended to continue reading and learn more about the underlying Docker container.
96+
97+
## The Hard Way
98+
99+
The following 4 steps describe how to add your code, build, and run the project with nothing other than the Docker binary; this should be relatively accurate cross-platform.
100+
73101
### 1) Add your Swift TensorFlow code
74102

75103
* Add your Swift source files to the to `Sources/STSLibary` directory
76-
* If you'd like them to be part of the runnable application, add the appropriate calls to the `run()` method of `Application.swift`. If you only want to access this code from the REPL, that's it!
104+
* If you'd like them to be part of the runnable application, add the appropriate calls to the `run()` method of `Application.swift`. If you only want to access this code from the REPL, no further work is required now.
77105

78106
### 2) Build
79107

0 commit comments

Comments
 (0)