Add frontend container & run instructions

pull/26/head
Guillermo Rodriguez 2023-10-09 07:39:23 -03:00
parent 20ee6c0317
commit 409df99a2c
No known key found for this signature in database
GPG Key ID: EC3AB66D5D83B392
5 changed files with 75 additions and 2 deletions

View File

@ -37,6 +37,31 @@ skynet run dgpu
### dockerized install ### dockerized install
## frontend
system dependencies:
- `docker`
```
# create and edit config from template
cp skynet.toml.example skynet.toml
# pull runtime container
docker pull guilledk/skynet:runtime-frontend
# run telegram bot
docker run \
-it \
--rm \
--network host \
--name skynet-telegram \
--mount type=bind,source="$(pwd)",target=/root/target \
guilledk/skynet:runtime-frontend \
skynet run telegram --db-pass PASSWORD --db-user USER --db-host HOST
```
## worker
system dependencies: system dependencies:
- `docker` with gpu enabled - `docker` with gpu enabled

View File

@ -9,3 +9,11 @@ docker build \
docker build \ docker build \
-t guilledk/skynet:runtime-cuda \ -t guilledk/skynet:runtime-cuda \
-f docker/Dockerfile.runtime+cuda-py311 . -f docker/Dockerfile.runtime+cuda-py311 .
docker build \
-t guilledk/skynet:runtime-frontend \
-f docker/Dockerfile.runtime+frontend .
docker build \
-t guilledk/skynet:runtime \
-f docker/Dockerfile.runtime .

View File

@ -2,7 +2,8 @@ from python:3.11
env DEBIAN_FRONTEND=noninteractive env DEBIAN_FRONTEND=noninteractive
run apt-get update && apt-get install -y git run apt-get update && apt-get install -y \
git
run curl -sSL https://install.python-poetry.org | python3 - run curl -sSL https://install.python-poetry.org | python3 -
@ -12,4 +13,13 @@ copy . /skynet
workdir /skynet workdir /skynet
run poetry install -v env POETRY_VIRTUALENVS_PATH /skynet/.venv
run poetry install
workdir /root/target
copy docker/entrypoint.sh /entrypoint.sh
entrypoint ["/entrypoint.sh"]
cmd ["skynet", "--help"]

View File

@ -0,0 +1,25 @@
from python:3.11
env DEBIAN_FRONTEND=noninteractive
run apt-get update && apt-get install -y \
git
run curl -sSL https://install.python-poetry.org | python3 -
env PATH "/root/.local/bin:$PATH"
copy . /skynet
workdir /skynet
env POETRY_VIRTUALENVS_PATH /skynet/.venv
run poetry install --with=frontend -v
workdir /root/target
copy docker/entrypoint.sh /entrypoint.sh
entrypoint ["/entrypoint.sh"]
cmd ["skynet", "--help"]

5
push_docker.sh 100755
View File

@ -0,0 +1,5 @@
docker push guilledk/skynet:runtime
docker push guilledk/skynet:runtime-frontend
docker push guilledk/skynet:runtime-cuda-py310
docker push guilledk/skynet:runtime-cuda-py311
docker push guilledk/skynet:runtime-cuda