https://github.com/golemfactory/gpu-on-golem-poc
https://github.com/golemfactory/gpu-on-golem-poc
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/golemfactory/gpu-on-golem-poc
- Owner: golemfactory
- Created: 2022-11-10T10:57:24.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-27T12:32:59.000Z (about 2 years ago)
- Last Synced: 2024-10-01T04:29:24.630Z (over 1 year ago)
- Language: TypeScript
- Size: 15.2 MB
- Stars: 8
- Watchers: 5
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gpu-on-golem-poc
### Client
In the `/client` dir:
1. Install dependencies: `npm install`
2. To run the development server: `npm run dev`
3. To build an app `npm run build`
4. Serve files `npm run start`
5. For optimized static build run `npm run static`
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
# Deployment
## Golem requestor installation
### Installation of Golem daemon and requestor
https://handbook.golem.network/requestor-tutorials/flash-tutorial-of-requestor-development
### Configure env variable
`export YAGNA_APPKEY=[yagna_key]`
You can obtain yagna key with `yagna app-key list`
## App
### Get the code
`git clone git@github.com:golemfactory/gpu-on-golem-poc.git`
### Frontend build
```shell
cd gpu-on-golem-poc/client
npm install
npm run static
rm -rf ../api/static/*
cp -R out/* ../api/static/
cd ..
```
### Backend preparations
```shell
sudo apt install redis
python3 -m venv venv
source venv/bin/activate
pip install --update pip
pip install -r api/requirements.txt
```
### Api start (can be started in `screen` or monitored by supervisor/monit/systemd):
```shell
[...]/venv/bin/uvicorn api.app:app --log-config=api/log.yml
```
This will start server on port **8000**.
### Golem service start
```shell
[...]/venv/bin/python -m diffusers.requestor.service
```
### Systemd services
Example files can be found in `config/systemd`.
### Env variables to control settings
- `APP_ENV` - taken into consideration by JS code while running `npm run static`