Skip to content

Commit

Permalink
Updates to support Edge CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
EdwinWiseOne committed Jun 17, 2024
1 parent 2bc3067 commit 6d55aaf
Show file tree
Hide file tree
Showing 15 changed files with 93 additions and 22 deletions.
2 changes: 1 addition & 1 deletion Minimal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ version = AppVersion(
description="This Is An Example Edge Application",
icon=ICON,
kind=AppKindEnum.Native,
proxy_kind=AppProxyKindEnum.Generic,
framework=AppProxyKindEnum.Generic,
link="quay.io/<YOUR_ORGANIZATION>/YOUR_IMAGE_NAME_HERE:TAG",
recommended_profile="edge.medium"
)
Expand Down
4 changes: 2 additions & 2 deletions Minimal/app_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
"cmd_deps": [
"docker"
],
"app_id": null,
"framework": null
"framework": "generic",
"app_id": null
}
8 changes: 5 additions & 3 deletions Minimal/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@
import subprocess
import json

with open("config.json", "r") as f:

with open("app_config.json", "r") as f:
config = json.load(f)
ENV_NAME = config["ENV_NAME"]
EDM_DEPS = config["EDM_DEPS"]
ENV_NAME = config["env_name"]
EDM_DEPS = config["cmd_deps"]


def bootstrap(ci_mode):
"""Create and populate dev env.
Expand Down
2 changes: 1 addition & 1 deletion Panel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ version = AppVersion(
description="This Is An Example Edge Application",
icon=ICON,
kind=AppKindEnum.Native,
proxy_kind=AppProxyKindEnum.Panel,
framework=AppProxyKindEnum.Panel,
link="quay.io/<YOUR_ORGANIZATION>/YOUR_IMAGE_NAME_HERE:TAG",
recommended_profile="edge.medium"
)
Expand Down
13 changes: 13 additions & 0 deletions Panel/app_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"env_name": "edge-panel-example",
"edm_deps": [
"click",
"pip",
"setuptools"
],
"cmd_deps": [
"docker"
],
"framework": "panel",
"app_id": null
}
10 changes: 7 additions & 3 deletions Panel/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,13 @@

import argparse
import subprocess
import json

ENV_NAME = "edge-panel-example"
EDM_DEPS = ["click", "pip", "setuptools"]

with open("app_config.json", "r") as f:
config = json.load(f)
ENV_NAME = config["env_name"]
EDM_DEPS = config["cmd_deps"]


def bootstrap(ci_mode):
Expand All @@ -35,7 +39,7 @@ def bootstrap(ci_mode):
print("Bootstrap complete.")

else:
print("Environment already exists; reusing.")
print(f"Environment '{ENV_NAME}' already exists; reusing.")

if not ci_mode:
print(f"Activating environment '{ENV_NAME}'")
Expand Down
2 changes: 1 addition & 1 deletion Plotly Dash/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ version = AppVersion(
description="This Is An Example Edge Application",
icon=ICON,
kind=AppKindEnum.Native,
proxy_kind=AppProxyKindEnum.PlotlyDash,
framework=AppProxyKindEnum.PlotlyDash,
link="quay.io/<YOUR_ORGANIZATION>/YOUR_IMAGE_NAME_HERE:TAG",
recommended_profile="edge.medium"
)
Expand Down
13 changes: 13 additions & 0 deletions Plotly Dash/app_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"env_name": "edge-plotly-dash-example",
"edm_deps": [
"click",
"pip",
"setuptools"
],
"cmd_deps": [
"docker"
],
"framework": "plotly-dash",
"app_id": null
}
10 changes: 7 additions & 3 deletions Plotly Dash/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,13 @@

import argparse
import subprocess
import json

ENV_NAME = "edge-plotly-dash-example"
EDM_DEPS = ["click", "pip", "setuptools"]

with open("app_config.json", "r") as f:
config = json.load(f)
ENV_NAME = config["env_name"]
EDM_DEPS = config["cmd_deps"]


def bootstrap(ci_mode):
Expand All @@ -35,7 +39,7 @@ def bootstrap(ci_mode):
print("Bootstrap complete.")

else:
print("Environment already exists; reusing.")
print(f"Environment '{ENV_NAME}' already exists; reusing.")

if not ci_mode:
print(f"Activating environment '{ENV_NAME}'")
Expand Down
2 changes: 1 addition & 1 deletion React/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ version = AppVersion(
description="This Is An Example Edge Application",
icon=ICON,
kind=AppKindEnum.Native,
proxy_kind=AppProxyKindEnum.React,
framework=AppProxyKindEnum.React,
link="quay.io/<YOUR_ORGANIZATION>/YOUR_IMAGE_NAME_HERE:TAG",
recommended_profile="edge.medium"
)
Expand Down
14 changes: 14 additions & 0 deletions React/app_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"env_name": "edge-react-example",
"edm_deps": [
"click",
"gunicorn",,
"pip",
"setuptools"
],
"cmd_deps": [
"docker"
],
"framework": "react",
"app_id": null
}
10 changes: 7 additions & 3 deletions React/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,13 @@

import argparse
import subprocess
import json

ENV_NAME = "edge-react-example"
EDM_DEPS = ["click", "gunicorn", "pip", "setuptools"]

with open("app_config.json", "r") as f:
config = json.load(f)
ENV_NAME = config["env_name"]
EDM_DEPS = config["cmd_deps"]


def bootstrap(ci_mode):
Expand All @@ -35,7 +39,7 @@ def bootstrap(ci_mode):
print("Bootstrap complete.")

else:
print("Environment already exists; reusing.")
print(f"Environment '{ENV_NAME}' already exists; reusing.")

if not ci_mode:
print(f"Activating environment '{ENV_NAME}'")
Expand Down
2 changes: 1 addition & 1 deletion Streamlit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ version = AppVersion(
description="This Is An Example Edge Application",
icon=ICON,
kind=AppKindEnum.Native,
proxy_kind=AppProxyKindEnum.Streamlit,
framework=AppProxyKindEnum.Streamlit,
link="quay.io/<YOUR_ORGANIZATION>/YOUR_IMAGE_NAME_HERE:TAG",
recommended_profile="edge.medium"
)
Expand Down
13 changes: 13 additions & 0 deletions Streamlit/app_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"env_name": "edge-streamlit-example",
"edm_deps": [
"click",
"pip",
"setuptools"
],
"cmd_deps": [
"docker"
],
"framework": "streamlit",
"app_id": null
}
10 changes: 7 additions & 3 deletions Streamlit/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,13 @@

import argparse
import subprocess
import json

ENV_NAME = "edge-streamlit-example"
EDM_DEPS = ["click", "pip", "setuptools"]

with open("app_config.json", "r") as f:
config = json.load(f)
ENV_NAME = config["env_name"]
EDM_DEPS = config["cmd_deps"]


def bootstrap(ci_mode):
Expand All @@ -35,7 +39,7 @@ def bootstrap(ci_mode):
print("Bootstrap complete.")

else:
print("Environment already exists; reusing.")
print(f"Environment '{ENV_NAME}' already exists; reusing.")

if not ci_mode:
print(f"Activating environment '{ENV_NAME}'")
Expand Down

0 comments on commit 6d55aaf

Please sign in to comment.