-
Notifications
You must be signed in to change notification settings - Fork 43.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(autogpt,autogpt_server): Build AutoGPT's Constituent Parts for d…
…eployment (#7188)
- Loading branch information
Showing
12 changed files
with
720 additions
and
459 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
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,60 @@ | ||
from pkgutil import iter_modules | ||
from shutil import which | ||
|
||
from cx_Freeze import Executable, setup | ||
|
||
packages = [ | ||
m.name | ||
for m in iter_modules() | ||
if m.ispkg | ||
and m.module_finder | ||
and ("poetry" in m.module_finder.path) # type: ignore | ||
] | ||
|
||
icon = ( | ||
"../../assets/gpt_dark_RGB.icns" | ||
if which("sips") | ||
else "../../assets/gpt_dark_RGB.ico" | ||
) | ||
|
||
|
||
setup( | ||
executables=[ | ||
Executable( | ||
"autogpt/__main__.py", target_name="autogpt", base="console", icon=icon | ||
), | ||
], | ||
options={ | ||
"build_exe": { | ||
"packages": packages, | ||
"includes": [ | ||
"autogpt", | ||
"spacy", | ||
"spacy.lang", | ||
"spacy.vocab", | ||
"spacy.lang.lex_attrs", | ||
"uvicorn.loops.auto", | ||
"srsly.msgpack.util", | ||
"blis", | ||
"uvicorn.protocols.http.auto", | ||
"uvicorn.protocols.websockets.auto", | ||
"uvicorn.lifespan.on", | ||
], | ||
"excludes": ["readability.compat.two"], | ||
}, | ||
"bdist_mac": { | ||
"bundle_name": "AutoGPT", | ||
"iconfile": "../assets/gpt_dark_RGB.icns", | ||
"include_resources": [""], | ||
}, | ||
"bdist_dmg": { | ||
"applications_shortcut": True, | ||
"volume_label": "AutoGPT", | ||
}, | ||
"bdist_msi": { | ||
"target_name": "AutoGPT", | ||
"add_to_path": True, | ||
"install_icon": "../assets/gpt_dark_RGB.ico", | ||
}, | ||
}, | ||
) |
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 @@ | ||
build/ |
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
Large diffs are not rendered by default.
Oops, something went wrong.
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,56 @@ | ||
from pkgutil import iter_modules | ||
from shutil import which | ||
|
||
from cx_Freeze import Executable, setup | ||
|
||
packages = [ | ||
m.name | ||
for m in iter_modules() | ||
if m.ispkg and m.module_finder and "poetry" in m.module_finder.path # type: ignore | ||
] | ||
packages.append("collections") | ||
|
||
# if mac use the icns file, otherwise use the ico file | ||
icon = ( | ||
"../../assets/gpt_dark_RGB.icns" | ||
if which("sips") | ||
else "../../assets/gpt_dark_RGB.ico" | ||
) | ||
|
||
setup( | ||
name="AutoGPT Server", | ||
url="https://agpt.co", | ||
executables=[ | ||
Executable( | ||
"autogpt_server/app.py", target_name="server", base="console", icon=icon | ||
), | ||
], | ||
options={ | ||
"build_exe": { | ||
"packages": packages, | ||
"includes": [ | ||
"autogpt_server", | ||
"uvicorn.loops.auto", | ||
"uvicorn.protocols.http.auto", | ||
"uvicorn.protocols.websockets.auto", | ||
"uvicorn.lifespan.on", | ||
], | ||
"excludes": ["readability.compat.two"], | ||
}, | ||
"bdist_mac": { | ||
"bundle_name": "AutoGPT", | ||
"iconfile": "../../assets/gpt_dark_RGB.icns", | ||
# "include_resources": ["IMG_3775.jpeg"], | ||
}, | ||
"bdist_dmg": { | ||
"applications_shortcut": True, | ||
"volume_label": "AutoGPT Server", | ||
}, | ||
"bdist_msi": { | ||
"target_name": "AutoGPTServer", | ||
"add_to_path": True, | ||
"install_icon": "../../assets/gpt_dark_RGB.ico", | ||
}, | ||
"bdist_appimage": {}, | ||
}, | ||
) |
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