cyborg-ai-git
commited on
Commit
·
9099f0d
1
Parent(s):
a9c0420
init
Browse files- Dockerfile +32 -0
- README.md +10 -0
- main.py +10 -0
- peer_config.yaml +27 -0
- requirements.txt +4 -0
Dockerfile
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#=========================================================================
|
2 |
+
# CyborgAI CC BY-NC-ND 4.0
|
3 |
+
# Creative Commons Attribution-NonCommercial-NoDerivatives International
|
4 |
+
#
|
5 |
+
# https://github.com/cyborg-ai-git
|
6 |
+
#=========================================================================
|
7 |
+
ARG PYTHON_VERSION=3.10-slim-buster
|
8 |
+
|
9 |
+
FROM python:${PYTHON_VERSION}
|
10 |
+
|
11 |
+
ENV PYTHONDONTWRITEBYTECODE 1
|
12 |
+
ENV PYTHONUNBUFFERED 1
|
13 |
+
ENV ISDOCKER 1
|
14 |
+
|
15 |
+
RUN set -ex && \
|
16 |
+
pip install --upgrade pip && \
|
17 |
+
|
18 |
+
RUN useradd -m -u 1000 user
|
19 |
+
USER user
|
20 |
+
ENV PATH="/home/user/.local/bin:$PATH"
|
21 |
+
|
22 |
+
WORKDIR /app
|
23 |
+
|
24 |
+
COPY --chown=user ./requirements.txt requirements.txt
|
25 |
+
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
26 |
+
|
27 |
+
COPY --chown=user peer_config.yaml /app
|
28 |
+
COPY --chown=user main.py /app
|
29 |
+
|
30 |
+
EXPOSE 8081
|
31 |
+
|
32 |
+
CMD ["python", "main.py"]
|
README.md
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
title: Cyborgai Api Test
|
3 |
+
emoji: 🔥
|
4 |
+
colorFrom: gray
|
5 |
+
colorTo: blue
|
6 |
+
sdk: docker
|
7 |
+
pinned: false
|
8 |
+
---
|
9 |
+
|
10 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
main.py
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#========================================================================================================================================
|
2 |
+
# CyborgAI CC BY-NC-ND 4.0 Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International https://github.com/cyborg-ai-git |
|
3 |
+
#========================================================================================================================================
|
4 |
+
|
5 |
+
from evo_framework import *
|
6 |
+
|
7 |
+
# --------------------------------------------------------------------------------------------------------------------------------------
|
8 |
+
if __name__ == "__main__":
|
9 |
+
asyncio.run(UBridge.getInstance().doRunPeer("peer_config.yaml"))
|
10 |
+
# --------------------------------------------------------------------------------------------------------------------------------------
|
peer_config.yaml
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#=========================================================================
|
2 |
+
# CyborgAI CC BY-NC-ND 4.0
|
3 |
+
# Creative Commons Attribution-NonCommercial-NoDerivatives International
|
4 |
+
#
|
5 |
+
# https://github.com/cyborg-ai-git
|
6 |
+
#=========================================================================
|
7 |
+
|
8 |
+
LOG_LEVEL: "INFO" #[VERBOSE, DEBUG, INFO, WARNING, ERROR]
|
9 |
+
|
10 |
+
peer:
|
11 |
+
bridge: RTC_FASTAPI #[ FASTAPI, RTC_FASTAPI, WEBSOCKET, EVORPC ]
|
12 |
+
label : "cyborgai-huggingface-test"
|
13 |
+
description : "peer huggingface test server"
|
14 |
+
urlLogo : "https://cyborgai.fly.dev/assets/images/appiconpreview.png"
|
15 |
+
enumApiVisibility : PUBLIC #[ PRIVATE, PUBLIC, LOCAL]
|
16 |
+
enumApiTunnel : LOCAL #[ LOCAL, NGROK, PINNGY, CLOUDFLARE, REMOTEIP]
|
17 |
+
localAddress: "127.0.0.1" #["0.0.0.0","127.0.0.1",..]
|
18 |
+
localPort: 8081
|
19 |
+
remotePort: 8081
|
20 |
+
api: #valid type: module.CApi : isEnabled
|
21 |
+
evo_package_admin.control.CAdminApi : true
|
22 |
+
evo_package_pdf.control.CPdfApi : false
|
23 |
+
evo_package_whisper.control.CWhisperApi: false
|
24 |
+
evo_package_ffmpeg.control.CFfmpegApi: false
|
25 |
+
evo_package_linkedin.control.CLinkedinApi: false
|
26 |
+
evo_package_openai.control.COpenaiApi: false
|
27 |
+
evo_package_assistant.control.CAssistantApi: false
|
requirements.txt
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#========================================================================================================================================
|
2 |
+
# CyborgAI CC BY-NC-ND 4.0 Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 Internation https://github.com/cyborg-ai-git |
|
3 |
+
#========================================================================================================================================
|
4 |
+
evo_framework>=2024.7.210148
|