-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: Add build and publish pipeline by Docker (#53)
* build: Add build and publish pipeline by Docker * build: Change to docker image * doc: Update README to reflect new deployment
- Loading branch information
Showing
4 changed files
with
51 additions
and
32 deletions.
There are no files selected for viewing
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,43 @@ | ||
name: Build the container image | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- Dockerfile | ||
- src/** | ||
- poetry.lock | ||
- pyproject.toml | ||
|
||
jobs: | ||
build: | ||
steps: | ||
- name: Checkout the repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
with: | ||
platforms: amd64, arm64 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to Github Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: Dockerfile | ||
push: true | ||
platforms: linux/amd64,linux/arm64 | ||
tags: | | ||
ghcr.io/${{ github.repository }}/llm-assistant:latest | ||
ghcr.io/${{ github.repository }}/llm-assistant:${{ github.sha }} |
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 |
---|---|---|
@@ -1,38 +1,14 @@ | ||
# Multifunctional LLM Assistant for Discord | ||
|
||
## Dependencies Installation | ||
This project is a multifunctional assistant bot for Discord. It is designed by VAIT to help our members with various tasks, such as testing LLM models and quickly review our members resume. | ||
|
||
We will use [Poetry](https://python-poetry.org/docs/) in this project. Please visit the link to install poetry on your local machine. | ||
## How to Run this Bot | ||
|
||
After successfully installing Poetry, use the following command to install the project dependencies: | ||
|
||
```shell | ||
poetry install | ||
``` | ||
|
||
This command will create a Python virtual environment and install all the required dependencies into that environment. | ||
|
||
To activate the Python environment, run: | ||
|
||
```shell | ||
poetry shell | ||
``` | ||
|
||
When you’re done working in the virtual environment, simply type: | ||
|
||
```shell | ||
exit | ||
``` | ||
|
||
--- | ||
|
||
## Discord Bot Development | ||
|
||
### Getting started | ||
### Setting up the bot in Discord | ||
|
||
- [Create a bot in discord](https://interactions-py.github.io/interactions.py/Guides/02%20Creating%20Your%20Bot/). | ||
- Add that bot to a test server. | ||
- Add that bot to your server. | ||
- When making the invite through OAuth2 URL Generator, make sure to enable `bot` and `applications.commands` options. | ||
- Follow the [Invite your bot](https://interactions-py.github.io/interactions.py/Guides/02%20Creating%20Your%20Bot/) section for reference. | ||
- Copy out `.env.example` into `.env`, and fill in the `DISCORD_BOT_TOKEN` and `DISCORD_GUILD_ID`. | ||
- Now, run the bot code locally and test the bot on your server. | ||
- Now, run the bot code locally; alternatively, you can deploy the bot in a docker-compose environment. See the sister repository [deploy-llm-bot](https://github.com/bifrostlab/deploy-llm-bot) for more information. |
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