mirror of https://github.com/skygpu/skynet.git
				
				
				
			Add frontend container & run instructions
							parent
							
								
									20ee6c0317
								
							
						
					
					
						commit
						409df99a2c
					
				
							
								
								
									
										25
									
								
								README.md
								
								
								
								
							
							
						
						
									
										25
									
								
								README.md
								
								
								
								
							| 
						 | 
					@ -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
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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 .
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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"]
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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"]
 | 
				
			||||||
| 
						 | 
					@ -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
 | 
				
			||||||
		Loading…
	
		Reference in New Issue