-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
38e05b5
commit c801821
Showing
10 changed files
with
72 additions
and
61 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 |
---|---|---|
|
@@ -76,3 +76,5 @@ __pycache__/ | |
# PyInstaller | ||
*.manifest | ||
*.spec | ||
|
||
my-project/ |
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
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,10 @@ | ||
import shutil | ||
from pathlib import Path | ||
|
||
def deploy(path :str) -> str: | ||
package_dir = Path(__file__).parent.parent | ||
source_path = package_dir / 'templates' / 'docker' / 'Dockerfile' | ||
destination_path = Path(path) / 'Dockerfile' | ||
|
||
print(f'Copying {source_path} to {destination_path}') | ||
shutil.copy(source_path, destination_path) |
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,20 @@ | ||
import requests | ||
|
||
def deploy(path :str) -> str: | ||
response = requests.post('https://api.hal9.com/api/v1/deploy', json = { | ||
'name': 'name', | ||
'title': 'title', | ||
'description': 'description', | ||
'access': 'access', | ||
'code': 'code', | ||
'prompt': 'prompt', | ||
'thumbnail': 'thumbnail', | ||
'token': 'token', | ||
'user': 'user', | ||
}) | ||
|
||
if not response.ok: | ||
print('Failed to deploy') | ||
exit() | ||
|
||
return |
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,3 @@ | ||
FROM python:3.11-slim | ||
|
||
RUN apt-get update |
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
[tool.poetry] | ||
name = "hal9" | ||
version = "2.0.4" | ||
version = "2.0.5" | ||
description = "" | ||
authors = ["Javier Luraschi <[email protected]>"] | ||
readme = "README.md" | ||
include = ["templates/openai/app.py"] | ||
include = ["templates/openai/app.py", "templates/docker/Dockerfile"] | ||
|
||
[tool.poetry.dependencies] | ||
python = ">=3.8,<3.9.7 || >3.9.7,<4.0" | ||
|
This file was deleted.
Oops, something went wrong.