You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+29-1
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,8 @@ The project is fully Dockerized via the [swift-tensorflow](https://github.com/za
44
44
45
45
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).
46
46
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
+
47
49
### Swift Package Manager
48
50
49
51
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
70
72
git init && git commit -am "initial"
71
73
```
72
74
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
+
73
101
### 1) Add your Swift TensorFlow code
74
102
75
103
* 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.
0 commit comments