-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from meadej/main
Pipeline updates (allows configuration variables in place of static values) and documentation
- Loading branch information
Showing
6 changed files
with
177 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
HOSTNAME=skyscan | ||
|
||
#Axis-PTZ | ||
TZ="New York" #Local timezone in "TZ database name" format. https://en.wikipedia.org/wiki/List_of_tz_database_time_zones | ||
LAT=38.889444 # Latitude of the camera | ||
LONG=-77.035278 # Longitude of the camera | ||
ALT=200 # Altitude of the camera, this should be in METERS above sea level | ||
ROLL=0 # Roll Angle of Camera Mount from Inertial | ||
PITCH=0 # Pitch Angle of Camera Mount from Inertial | ||
YAW=0 # Yaw Angle of Camera Mount from Inertial | ||
MIN_ELEVATION=0 # The minimum elevation for the camera. | ||
FEEDER_ID=long-api-key-goes-here # Your FlightAware feeder ID (required) | ||
AXIS_USERNAME=root # The username for the Axis camera | ||
AXIS_PASSWORD=password # The Password for the Axis camera | ||
AXIS_IP=192.168.1.220 # The IP address of the camera | ||
CAMERA_MOVE_SPEED=50 # The speed at which the Axis will move for Pan/Tilt (0-100) | ||
CAMERA_DELAY=0.5 # How many seconds after issuing a Pan/Tilt command should a picture be taken | ||
CAMERA_ZOOM=1000 # The zoom setting for the camera (0-9999) | ||
CAMERA_LEAD=0.5 # How many seconds ahead of a plane's predicted location should the camera be positioned | ||
RTL_DEV=1 # The device ID for the RTL-SDR - set using the rtl_eeprom program | ||
GPS_SERIAL=/dev/ttyACM0 # GPS module serial port | ||
|
||
#Edge-detect | ||
WEIGHTS=/data/weights/localizer.pt | ||
AGNOSTIC_NMS=True | ||
NOSAVE=True | ||
CONF_THRES=0.25 | ||
IMG_SIZE=640 | ||
DEVICE=CPU | ||
IOU_THRES=0.45 | ||
SOURCE_DIR=/data/tosort | ||
PLANE_DIR=/data/plane | ||
NOPLANE_DIR=/data/noplane | ||
LOG_DIR=/data/log | ||
VIEW_IMG=False | ||
SAVE_TXT=False | ||
SAVE_JSON=True | ||
SAVE_CONF=False | ||
CLASSES=0 | ||
AUGMENT=False | ||
MQTT_IP=mqtt | ||
MQTT_TOPIC=/skyscan/captures/data/processed | ||
CAMERA_TOPIC=skyscan/${HOSTNAME}/image/edgetech-axis-ptz/JSON | ||
NO_TRACE=False | ||
UPDATE=False | ||
OMP_NUM_THREADS=1 | ||
|
||
# Coral Detect Variables | ||
CORAL_WEIGHTS=/data/weights/localizer.tflite | ||
|
||
# Tracker Variables | ||
MQTT_IP=mqtt | ||
TRACKER_INPUT_TOPIC=skyscan/${HOSTNAME}/ADSB/edgetech-pingusb/JSON | ||
TRACKER_PUBLISH_TOPIC=skyscan/${HOSTNAME}/flight/edgetech-tracker/JSON |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# SkyScan GitHub Workflows | ||
|
||
## Overview | ||
|
||
SkyScan and associated projects use a number of GitHub action workflows to verify code security, secrets integrity, and provide project building and deployment capability. These workflows and their required secrets and configuration variables are detailed below. | ||
|
||
For information on adding configuration variables and secrets, see the GitHub Actions documentation [here](https://docs.github.com/en/actions/learn-github-actions/variables#creating-configuration-variables-for-an-environment) and [here](https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository). | ||
|
||
## Docker Container Building | ||
|
||
SkyScan uses the action outlined in `dockerbuild.yml` to automatically build Dockerfiles located in the project and push them to Docker Hub. This action is triggered everytime there is a push to the `main` branch. | ||
|
||
### Secrets | ||
* `DOCKER_USERNAME` (required) - The login username for Docker Hub. | ||
* `DOCKER_NAMESPACE` (required) - The Docker Hub account that this image will be pushed to. The `DOCKER_USERNAME` Docker Hub user must have write permissions to `DOCKER_NAMESPACE`. Oftentimes they are the same value. | ||
* `DOCKER_TOKEN` (required) - A Docker Hub personal access token associated with the `DOCKER_USERNAME` account. | ||
|
||
### Configuration Variables | ||
* `PROJECT_NAME` (required) - The overarching name of the project. | ||
* `DOCKER_BUILD_PLATFORMS` (optional, defaults to `linux/amd64`) - A comma separated list of the target platforms the images will be built for. | ||
* `DOCKER_BUILD_FOLDERS` (optional, defaults to `.`) - A comma separated list of folders under the main repository containing Dockerfiles to be built. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Set environment variables | ||
export COMPOSE_FILE_URL=https://raw.githubusercontent.com/meadej/SkyScan/main/docker-compose.yml | ||
export ENV_FILE_URL=https://raw.githubusercontent.com/meadej/SkyScan/main/.env-example | ||
|
||
echo "Installing skyscan on ${HOSTNAME} at $(pwd)" | ||
|
||
echo "Configuring Mobian base" | ||
bash <(curl -fsSL https://short.iqt.org/pinephonepro) | ||
|
||
|
||
mkdir skyscan | ||
cd skyscan | ||
mkdir data | ||
cd data | ||
curl -O https://opensky-network.org/datasets/metadata/aircraftDatabase.csv | ||
cd .. | ||
|
||
# Make necessary folders | ||
mkdir raw | ||
mkdir coral | ||
mkdir coral/plane | ||
mkdir coral/noplane | ||
mkdir coral/log | ||
mkdir weights | ||
mkdir edge | ||
mkdir edge/plane | ||
mkdir edge/noplane | ||
mkdir edge/log | ||
mkdir processed | ||
mkdir processed/log | ||
|
||
curl -O $COMPOSE_FILE_URL | ||
curl -O $ENV_FILE_URL | ||
|
||
docker-compose pull | ||
|
||
echo "Installation complete. Run `docker-compose up` to start the system" | ||
echo "Before running, ensure you have replaced the demo weights with your own trained weights" |