Compare commits

..

1 Commits

Author SHA1 Message Date
e4492680bb add gitea actions
Some checks failed
Build and Push Image / Release (push) Failing after 4m11s
2024-03-05 13:27:29 +09:00
12 changed files with 100 additions and 284 deletions

View File

@@ -1,20 +0,0 @@
{
"permissions": {
"allow": [
"Bash(find:*)",
"Bash(cat:*)",
"Bash(grep:*)",
"Bash(./scpt/gh-actions.zsh:*)",
"Bash(mkdir:*)",
"Bash(chmod:*)",
"Bash(../ai/scripts/generate_claude.sh:*)",
"Bash(jq:*)",
"Bash(ls:*)",
"Bash(../ai/scripts/sync_docs.sh:*)",
"Bash(mv:*)",
"Bash(rm:*)",
"Bash(../ai/scripts/update-submodules.sh:*)"
],
"deny": []
}
}

View File

@@ -1,6 +0,0 @@
# https://github.com/containers/shortnames
# ~/.config/containers/registries.conf.d/ai.conf
unqualified-search-registries=["git.syui.ai", "docker.io", "ghcr.io"]
[aliases]
"aios"="git.syui.ai/ai/os"

View File

@@ -1,9 +1,5 @@
name: build and push image
on:
schedule:
- cron: '0 0 * * *'
push:
name: Build and Push Image
on: [ push ]
env:
TAG: latest
@@ -17,14 +13,28 @@ jobs:
name: Release
runs-on: ubuntu-latest
container:
image: ghcr.io/syui/aios
image: syui/aios
options: --privileged
steps:
- name: Initialize
run: |
pacman -Syuu --noconfirm base-devel archiso docker git curl
docker pull ghcr.io/syui/aios
docker tag syui/aios ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}
docker pull syui/aios
docker tag syui/aios ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}
echo "${{ env.APP_TOKEN }}" | docker login ${{ env.REGISTRY }} -u syui --password-stdin
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}
- uses: actions/setup-go@v4
with:
go-version: 'stable'
- name: prepare release
run: |
mkdir out
cd out
curl -sLO https://github.com/syui/aios/releases/download/latest/aios-bootstrap.tar.gz
- name: release
id: use-go-action
uses: https://gitea.com/actions/release-action@main
with:
files: |-
out/**
api_key: '${{secrets.APP_TOKEN}}'

View File

@@ -4,6 +4,8 @@ on:
push:
branches:
- main
schedule:
- cron: "0 0 * * *"
permissions:
contents: write
@@ -26,6 +28,25 @@ jobs:
uses: actions/checkout@v4
- name: Initialize
run: |
pacman -Syuu --noconfirm base-devel archiso docker git nodejs
git clone https://gitlab.archlinux.org/archlinux/archiso
cp -rf ./cfg/profiledef.sh /usr/share/archiso/configs/releng/
cp -rf ./cfg/profiledef.sh ./archiso/configs/releng/profiledef.sh
cp -rf ./cfg/profiledef.sh ./archiso/configs/baseline/profiledef.sh
cp -rf ./scpt/mkarchiso ./archiso/archiso/mkarchiso
./archiso/archiso/mkarchiso -v -o ./ ./archiso/configs/releng/
tar xf aios-bootstrap*.tar.gz
mkdir -p root.x86_64/var/lib/machines/arch
pacstrap -c root.x86_64/var/lib/machines/arch base
echo -e 'Server = http://mirrors.cat.net/archlinux/$repo/os/$arch
Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch' >> ./root.x86_64/etc/pacman.d/mirrorlist
sed -i s/CheckSpace/#CheckeSpace/ root.x86_64/etc/pacman.conf
arch-chroot root.x86_64 /bin/sh -c 'pacman-key --init'
arch-chroot root.x86_64 /bin/sh -c 'pacman-key --populate archlinux'
arch-chroot root.x86_64 /bin/sh -c 'pacman -Syu --noconfirm base base-devel linux vim git zsh rust openssh openssl jq go nodejs docker'
arch-chroot root.x86_64 /bin/sh -c 'chsh -s /bin/zsh'
arch-chroot root.x86_64 /bin/sh -c 'git clone https://git.syui.ai/ai/bot && cd bot && cargo build && cp -rf ./target/debug/ai /bin/ && ai ai'
tar -zcvf aios-bootstrap.tar.gz root.x86_64/
tar -C ./root.x86_64 -c . | docker import - ${{ env.IMAGE_NAME }}
echo "${{ env.DOCKER_TOKEN }}" | docker login -u syui --password-stdin
docker push ${{ env.IMAGE_NAME }}

1
.gitignore vendored
View File

@@ -1,2 +1 @@
.config/ai
**.DS_Store

View File

@@ -1,79 +0,0 @@
# ai.os プロジェクト固有情報
## プロジェクト概要
- **名前**: ai.os
- **パッケージ**: aios
- **タイプ**: ArchLinux-based OS
- **役割**: AI統合OS基盤
## 現在の実装状況
### OS基盤
- **ベース**: ArchLinux + archiso
- **配布形式**: Docker container (bootstrap tar.gz)
- **ビルドシステム**: GitHub Actions自動ビルド
- **レジストリ**: Docker Hub, GitHub Packages, git.syui.ai
### 搭載パッケージ
```bash
base base-devel linux vim git zsh rust openssh openssl jq go nodejs docker podman bc
```
### AI統合コンポーネント
- **ai.bot**: Rust製、`/bin/ai`でインストール済み
- **ai.gpt**: 統合予定Python + fastapi_mcp
- **Container設定**: Podman用AI registryプリセット
## 将来の発展方向
### Phase 1: AI基盤統合
- **ai.gpt搭載**: MCPサーバー自動起動
- **ai.shell**: Claude Code風terminal組み込み
- **Python環境**: fastapi_mcp基盤
### Phase 2: ゲーム融合OS
- **ai.verse統合**: UEメタバース基盤
- **ai.card**: iOS/Web UI統合
- **自動起動**: systemdでAIサービス管理
### Phase 3: 統合デバイス化
- **ai.game device**: 専用ハードウェア対応
- **分散SNS**: atproto完全統合
- **現実反映**: ゲーム↔現実データ同期
## 技術仕様
### ビルド設定
- **profiledef.sh**: bootstrap modeでtar.gz生成
- **Version管理**: 日付ベース自動更新YYYY.MM.DD
- **CI/CD**: GitHub Actions + multi-registry push
### 設定管理
- **os-release**: `/etc/os-release`準拠
- **Container**: Podman shortname alias対応
- **Network**: ai.conf registryプリセット
### 開発環境
- **言語**: Rustai.bot, Pythonai.gpt統合予定
- **Shell**: zsh
- **Container**: Docker + Podman両対応
## 使用方法
### Docker実行
```bash
docker run -it git.syui.ai/ai/os ai
docker run -it syui/aios ai
docker run -it ghcr.io/syui/aios ai
```
### Podman実行
```bash
podman pull aios # shortname alias
```
### ローカルビルド
```bash
./scpt/gh-actions.zsh # GitHub Actions workflow生成
./build.zsh # ローカルビルド実行
```

View File

@@ -1,79 +1,26 @@
# ai.os プロジェクト固有情報
## ai `os`
## プロジェクト概要
- **名前**: ai.os
- **パッケージ**: aios
- **タイプ**: ArchLinux-based OS
- **役割**: AI統合OS基盤
<img src="./icon/ai.png" width="100">
## 現在の実装状況
- name : ai os
- image : [aios-bootstrap.tar.gz](https://github.com/syui/aios/releases/tag/latest)
- base : [archlinux](https://gitlab.archlinux.org/archlinux)
### OS基盤
- **ベース**: ArchLinux + archiso
- **配布形式**: Docker container (bootstrap tar.gz)
- **ビルドシステム**: GitHub Actions自動ビルド
- **レジストリ**: Docker Hub, GitHub Packages, git.syui.ai
### 搭載パッケージ
```bash
base base-devel linux vim git zsh rust openssh openssl jq go nodejs docker podman bc
```sh
$ docker run -it git.syui.ai/ai/os ai
```
### AI統合コンポーネント
- **ai.bot**: Rust製、`/bin/ai`でインストール済み
- **ai.gpt**: 統合予定Python + fastapi_mcp
- **Container設定**: Podman用AI registryプリセット
### docker
## 将来の発展方向
```sh
# https://hub.docker.com/r/syui/aios
$ docekr run -it syui/aios ai
### Phase 1: AI基盤統合
- **ai.gpt搭載**: MCPサーバー自動起動
- **ai.shell**: Claude Code風terminal組み込み
- **Python環境**: fastapi_mcp基盤
### Phase 2: ゲーム融合OS
- **ai.verse統合**: UEメタバース基盤
- **ai.card**: iOS/Web UI統合
- **自動起動**: systemdでAIサービス管理
### Phase 3: 統合デバイス化
- **ai.game device**: 専用ハードウェア対応
- **分散SNS**: atproto完全統合
- **現実反映**: ゲーム↔現実データ同期
## 技術仕様
### ビルド設定
- **profiledef.sh**: bootstrap modeでtar.gz生成
- **Version管理**: 日付ベース自動更新YYYY.MM.DD
- **CI/CD**: GitHub Actions + multi-registry push
### 設定管理
- **os-release**: `/etc/os-release`準拠
- **Container**: Podman shortname alias対応
- **Network**: ai.conf registryプリセット
### 開発環境
- **言語**: Rustai.bot, Pythonai.gpt統合予定
- **Shell**: zsh
- **Container**: Docker + Podman両対応
## 使用方法
### Docker実行
```bash
docker run -it git.syui.ai/ai/os ai
docker run -it syui/aios ai
docker run -it ghcr.io/syui/aios ai
# https://github.com/users/syui/packages/container/package/aios
$ docker run -it ghcr.io/syui/aios ai
```
### Podman実行
```bash
podman pull aios # shortname alias
```
### link
### ローカルビルド
```bash
./scpt/gh-actions.zsh # GitHub Actions workflow生成
./build.zsh # ローカルビルド実行
```
- https://git.syui.ai/ai/os
- https://github.com/syui/aios

View File

@@ -1,2 +1,20 @@
#!/bin/zsh
pacman -Syuu --noconfirm base-devel archiso docker git nodejs
git clone https://gitlab.archlinux.org/archlinux/archiso
cp -rf ./cfg/profiledef.sh /usr/share/archiso/configs/releng/
cp -rf ./cfg/profiledef.sh ./archiso/configs/releng/profiledef.sh
cp -rf ./cfg/profiledef.sh ./archiso/configs/baseline/profiledef.sh
cp -rf ./scpt/mkarchiso ./archiso/archiso/mkarchiso
./archiso/archiso/mkarchiso -v -o ./ ./archiso/configs/releng/
tar xf aios-bootstrap*.tar.gz
mkdir -p root.x86_64/var/lib/machines/arch
pacstrap -c root.x86_64/var/lib/machines/arch base
echo -e 'Server = http://mirrors.cat.net/archlinux/$repo/os/$arch
Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch' >> ./root.x86_64/etc/pacman.d/mirrorlist
sed -i s/CheckSpace/#CheckeSpace/ root.x86_64/etc/pacman.conf
arch-chroot root.x86_64 /bin/sh -c 'pacman-key --init'
arch-chroot root.x86_64 /bin/sh -c 'pacman-key --populate archlinux'
arch-chroot root.x86_64 /bin/sh -c 'pacman -Syu --noconfirm base base-devel linux vim git zsh rust openssh openssl jq go nodejs docker'
arch-chroot root.x86_64 /bin/sh -c 'chsh -s /bin/zsh'
arch-chroot root.x86_64 /bin/sh -c 'git clone https://git.syui.ai/ai/bot && cd bot && cargo build && cp -rf ./target/debug/ai /bin/ && ai ai'
tar -zcvf aios-bootstrap.tar.gz root.x86_64/

View File

@@ -4,6 +4,8 @@ on:
push:
branches:
- main
schedule:
- cron: "0 0 * * *"
permissions:
contents: write
@@ -26,6 +28,25 @@ jobs:
uses: actions/checkout@v4
- name: Initialize
run: |
pacman -Syuu --noconfirm base-devel archiso docker git nodejs
git clone https://gitlab.archlinux.org/archlinux/archiso
cp -rf ./cfg/profiledef.sh /usr/share/archiso/configs/releng/
cp -rf ./cfg/profiledef.sh ./archiso/configs/releng/profiledef.sh
cp -rf ./cfg/profiledef.sh ./archiso/configs/baseline/profiledef.sh
cp -rf ./scpt/mkarchiso ./archiso/archiso/mkarchiso
./archiso/archiso/mkarchiso -v -o ./ ./archiso/configs/releng/
tar xf aios-bootstrap*.tar.gz
mkdir -p root.x86_64/var/lib/machines/arch
pacstrap -c root.x86_64/var/lib/machines/arch base
echo -e 'Server = http://mirrors.cat.net/archlinux/$repo/os/$arch
Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch' >> ./root.x86_64/etc/pacman.d/mirrorlist
sed -i s/CheckSpace/#CheckeSpace/ root.x86_64/etc/pacman.conf
arch-chroot root.x86_64 /bin/sh -c 'pacman-key --init'
arch-chroot root.x86_64 /bin/sh -c 'pacman-key --populate archlinux'
arch-chroot root.x86_64 /bin/sh -c 'pacman -Syu --noconfirm base base-devel linux vim git zsh rust openssh openssl jq go nodejs docker'
arch-chroot root.x86_64 /bin/sh -c 'chsh -s /bin/zsh'
arch-chroot root.x86_64 /bin/sh -c 'git clone https://git.syui.ai/ai/bot && cd bot && cargo build && cp -rf ./target/debug/ai /bin/ && ai ai'
tar -zcvf aios-bootstrap.tar.gz root.x86_64/
tar -C ./root.x86_64 -c . | docker import - ${{ env.IMAGE_NAME }}
echo "${{ env.DOCKER_TOKEN }}" | docker login -u syui --password-stdin
docker push ${{ env.IMAGE_NAME }}

View File

@@ -1,7 +1,7 @@
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
IMAGE_ID=aios
IMAGE_VERSION=2025.06.07
IMAGE_VERSION=2024.02.11
NAME=ai os
PRETTY_NAME=ai os
ID=ai

View File

@@ -1,79 +0,0 @@
# ai.os プロジェクト固有情報
## プロジェクト概要
- **名前**: ai.os
- **パッケージ**: aios
- **タイプ**: ArchLinux-based OS
- **役割**: AI統合OS基盤
## 現在の実装状況
### OS基盤
- **ベース**: ArchLinux + archiso
- **配布形式**: Docker container (bootstrap tar.gz)
- **ビルドシステム**: GitHub Actions自動ビルド
- **レジストリ**: Docker Hub, GitHub Packages, git.syui.ai
### 搭載パッケージ
```bash
base base-devel linux vim git zsh rust openssh openssl jq go nodejs docker podman bc
```
### AI統合コンポーネント
- **ai.bot**: Rust製、`/bin/ai`でインストール済み
- **ai.gpt**: 統合予定Python + fastapi_mcp
- **Container設定**: Podman用AI registryプリセット
## 将来の発展方向
### Phase 1: AI基盤統合
- **ai.gpt搭載**: MCPサーバー自動起動
- **ai.shell**: Claude Code風terminal組み込み
- **Python環境**: fastapi_mcp基盤
### Phase 2: ゲーム融合OS
- **ai.verse統合**: UEメタバース基盤
- **ai.card**: iOS/Web UI統合
- **自動起動**: systemdでAIサービス管理
### Phase 3: 統合デバイス化
- **ai.game device**: 専用ハードウェア対応
- **分散SNS**: atproto完全統合
- **現実反映**: ゲーム↔現実データ同期
## 技術仕様
### ビルド設定
- **profiledef.sh**: bootstrap modeでtar.gz生成
- **Version管理**: 日付ベース自動更新YYYY.MM.DD
- **CI/CD**: GitHub Actions + multi-registry push
### 設定管理
- **os-release**: `/etc/os-release`準拠
- **Container**: Podman shortname alias対応
- **Network**: ai.conf registryプリセット
### 開発環境
- **言語**: Rustai.bot, Pythonai.gpt統合予定
- **Shell**: zsh
- **Container**: Docker + Podman両対応
## 使用方法
### Docker実行
```bash
docker run -it git.syui.ai/ai/os ai
docker run -it syui/aios ai
docker run -it ghcr.io/syui/aios ai
```
### Podman実行
```bash
podman pull aios # shortname alias
```
### ローカルビルド
```bash
./scpt/gh-actions.zsh # GitHub Actions workflow生成
./build.zsh # ローカルビルド実行
```

View File

@@ -1,17 +1,5 @@
#!/bin/zsh
# Platform-specific commands
case $OSTYPE in
darwin*)
sed_inplace() { sed -i '' "$@"; }
date_cmd() { gdate "$@"; }
;;
linux*)
sed_inplace() { sed -i "$@"; }
date_cmd() { date "$@"; }
;;
esac
d=${0:a:h}
dd=${0:a:h:h}
@@ -21,6 +9,8 @@ on:
push:
branches:
- main
schedule:
- cron: "0 0 * * *"
permissions:
contents: write
@@ -68,10 +58,6 @@ yml_c=' tar -C ./root.x86_64 -c . | docker import - ${{ env.IMAGE_NAME
aios-bootstrap.tar.gz
'
# Update version in os-release
current_date=$(date_cmd +%Y.%m.%d)
sed_inplace "s/IMAGE_VERSION=.*/IMAGE_VERSION=$current_date/" $dd/cfg/os-release
yml_b=`cat $dd/build.zsh |sed '1d'`
echo $yml_a >! $dd/cfg/gh-actions.yml
@@ -83,5 +69,3 @@ echo '#!/bin/zsh' >! $dd/build.zsh
echo $yml_b >> $dd/build.zsh
cat $dd/build.zsh
cp -rf $dd/cfg/gh-actions.yml $dd/.github/workflows/release.yml