sdk docs - downloading

This commit is contained in:
Eric Harding committed 2019-10-09 18:56:30 -04:00
1 parent d5225aa75b
commit 245b5d0f99
9 files changed
+122 -13

No files matched your search

@@ -3,4 +3,13 @@ title = "Development"
weight = 3
+++
todo: write some code
# Visual Studio Code
In this section we're going to use a special feature of Visual Studio Code to do our editing. If you are using a different editor skip to the <a href="#other-editor">other editor</a> section.
# Other Editor
Good luck. 🦁🐯🐻
Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

@@ -3,8 +3,64 @@ title = "Download SDK"
weight = 2
+++
* Request access
## Request Access 🔑
* Download .tar file
To start using the BTS Spark SDK you will need to request access though our sales department. Please email <a href="mailto:info@bluetradesys.com">info@bluetradesys.com</a> or call <a href="tel:919-913-0850">(919) 913-0850</a> and we will provide download credentials.
* unzip and `docker import`
## Download
Download the latest SDK image here: <a href="https://api.bluetradesys.com/download/spark_sdk_latest.zip">spark_sdk.zip</a>
Unzip that folder into a working directory. Inside you should see something like this:
```
spark_sdk.img
spark_installer.exe
devcontainer.json
algo_template/
bin/
```
## Import
Import the spark_sdk image into docker using the `docker load` command.
```
docker load < spark_sdk.img
```
<div class="info">
<h4>If you see this error it means Docker Desktop is not running:</h4>
error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/images/json: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.
</div>
Confirm that the image is loaded by running `docker images` which should list the new image.
```
c:\bts> docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
bluetradingsystems/spark_sdk latest a6dde8add63a 2 weeks ago 2.51GB
```
## Run 🏃‍♀️
Start the docker container by running
```
docker run -d -v %CD%:/sdk --name spark_sdk bluetradingsytems/spark_sdk
```
<div class="linux">
If you are using Linux or Mac replace <strong>%CD%</strong> with <strong>$PWD</strong>.
</div>
## Success 🎉
Docker is now running the spark SDK image. If you are on Windows or Mac it is running inside a virtual Linux machine. You can see that is is running by typing `docker ps` to list running docker containers. If you restart the Docker Desktop application you will need to start the spark_sdk image again using `docker start spark_sdk`.
## Update
To update your Spark SDK simply download an unzip a new spark_sdk.zip and use docker load to import the new spark_sdk.img.
Then stop, remove and restart spark_sdk.
```
c:\bts> docker stop spark_sdk
c:\bts> docker rm spark_sdk
c:\bts> docker run -d -v %cd%:/sdk --name spark_sdk bluetradingsytems/spark_sdk
```
@@ -5,19 +5,40 @@ weight = 1
These instructions assume you are using Microsoft Windows but you should be able to follow them on a Linux or Mac with minor modifications.
<div class="linux">
When there is a significant difference on non-Windows platforms it will be called out in a box like this one.
</div>
The minimum hardware requirements for using the SDK are:
- **8 GB** RAM (preferably 16 GB or more)
- **12 GB** RAM (preferably 16 GB or more)
- 4 CPU cores
- 20 GB free hard disk space
The Spark SDK uses a tool called Docker to distribute all of the tools you need to build and test your trading algorithm ("Algo"). Once you have Docker installed you can download and run the latest SDK image.
To use the Spark SDK you will need to install Docker. You don't need a C++ compiler as one is included in the spark SDK distribution.
The Spark SDK uses a tool called Docker to distribute all of the tools you need to build and test your trading algorithm ("Algo"). Once you have Docker installed you can download and import the Spark SDK image and be ready to start developing your Algo in a few minutes.
## Docker
* Install Docker
[Install Docker](https://www.docker.com/products/docker-desktop)
Download and install <a href="https://www.docker.com/products/docker-desktop" target="_blank">Docker Desktop for Windows/Mac. <i class="fa fa-fw fa-window-restore" aria-hidden="true"></i></a>
<div class="linux">
If you are using Linux follow the <a href="https://docs.docker.com/install/#supported-platforms">official install instructions for Docker for your distribution.</a>
</div>
During the install Docker may ask you to enable virtualization support and reboot.
Once Docker Desktop is installed and running it will create an icon in your system tray area that looks like the Docker logo.
![](../docker_tray.png)
Right click on the tray icon and choose 'Settings' and choose the 'Advanced' tab.
Ensure that the docker image has 8192 MB of memory and at least 2 cores. Memory that you assign to the docker image will not be available to Windows/Mac while Docker is running. CPU cores are shared with the host OS. Since you are going to use this image to compile your Algo it makes sense to allow Docker to use all available cores.
<img src="../docker_config.png" width="640" >
## Editor
* Install an editor
This documentation assumes you are going to use the
<a href="https://code.visualstudio.com/" target="_blank">Visual Studio Code <i class="fa fa-fw fa-window-restore" aria-hidden="true"></i></a>
editor to develop your Algo. The Spark SDK comes with a complete configuration for C++ development with VSCode so this is the simplest way to get started. However, if you are already familiar with a different editor you are welcome to use it.
+6
View File
@@ -0,0 +1,6 @@
+++
title = "Algo Lifecycle"
weight = 0
+++
todo
+2 -2
View File
@@ -86,8 +86,8 @@ pre {
p code, li code {
background-color: #f5f5f5;
white-space: pre-wrap;
padding: 5px;
border-radius: 5px;
padding: 3px;
border-radius: 3px;
font-size: 0.85rem;
box-shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 1px rgba(0,0,0,.1), 0 2px 1px -1px rgba(0,0,0,.12);
}
+14
View File
@@ -22,6 +22,20 @@ header {
}
}
.linux {
padding: 25px 15px;
background: #eff0f1;
border-radius: 5px;
border: 1px solid #0072a2;
}
.info {
padding: 25px 15px;
background: #ffffe0;
border-radius: 5px;
border: 1px solid #383838;
}
footer {
text-align: center;
+3
View File
@@ -0,0 +1,3 @@
<div class="linux">
{{body}}
</div>