feat: add opencut/io-paint/clash
This commit is contained in:
21
src/clash/docker-compose.yaml
Normal file
21
src/clash/docker-compose.yaml
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
x-default: &default
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- &localtime /etc/localtime:/etc/localtime:ro
|
||||||
|
- &timezone /etc/timezone:/etc/timezone:ro
|
||||||
|
logging:
|
||||||
|
driver: json-file
|
||||||
|
options:
|
||||||
|
max-size: 100m
|
||||||
|
|
||||||
|
services:
|
||||||
|
clash:
|
||||||
|
<<: *default
|
||||||
|
image: centralx/clash:${CLASH_VERSION:-1.18.0}
|
||||||
|
ports:
|
||||||
|
- "7880:80"
|
||||||
|
- "7890:7890"
|
||||||
|
volumes:
|
||||||
|
- *localtime
|
||||||
|
- *timezone
|
||||||
|
- ./config.yaml:/home/runner/.config/clash/config.yaml
|
||||||
1
src/io-paint/.gitignore
vendored
Normal file
1
src/io-paint/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
/models
|
||||||
18
src/io-paint/Dockerfile
Normal file
18
src/io-paint/Dockerfile
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
FROM pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
ARG VERSION=1.6.0
|
||||||
|
|
||||||
|
WORKDIR /workspace
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
software-properties-common \
|
||||||
|
libsm6 libxext6 ffmpeg libfontconfig1 libxrender1 libgl1-mesa-glx \
|
||||||
|
curl python3-pip
|
||||||
|
RUN apt-get clean && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
RUN python3 -m pip install --upgrade pip
|
||||||
|
RUN pip3 install iopaint==${VERSION} && pip3 cache purge
|
||||||
|
|
||||||
|
EXPOSE 8080
|
||||||
|
CMD ["iopaint", "start", "--model=lama", "--device=cuda", "--port=8080", "--host=0.0.0.0"]
|
||||||
3
src/io-paint/README.md
Normal file
3
src/io-paint/README.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# IOPaint
|
||||||
|
|
||||||
|
Ref: [Dockerfile](https://github.com/Sanster/IOPaint/blob/main/docker/GPUDockerfile)
|
||||||
39
src/io-paint/docker-compose.yaml
Normal file
39
src/io-paint/docker-compose.yaml
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
x-default: &default
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- &localtime /etc/localtime:/etc/localtime:ro
|
||||||
|
- &timezone /etc/timezone:/etc/timezone:ro
|
||||||
|
logging:
|
||||||
|
driver: json-file
|
||||||
|
options:
|
||||||
|
max-size: 100m
|
||||||
|
|
||||||
|
services:
|
||||||
|
lama-cleaner:
|
||||||
|
<<: *default
|
||||||
|
image: ${DOCKER_REGISTRY:-docker.io}/local/lama-cleaner:${BUILD_VERSION:-latest}
|
||||||
|
ports:
|
||||||
|
- 8080:8080
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
# environment:
|
||||||
|
# HF_ENDPOINT: https://hf-mirror.com
|
||||||
|
volumes:
|
||||||
|
- *localtime
|
||||||
|
- *timezone
|
||||||
|
- ./models:/root/.cache
|
||||||
|
command:
|
||||||
|
- iopaint
|
||||||
|
- start
|
||||||
|
- --model=lama
|
||||||
|
- --device=cuda
|
||||||
|
- --port=8080
|
||||||
|
- --host=0.0.0.0
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
reservations:
|
||||||
|
devices:
|
||||||
|
- driver: nvidia
|
||||||
|
device_ids: ['0']
|
||||||
|
capabilities: [compute, utility]
|
||||||
12
src/mongodb-standalone/.env.example
Normal file
12
src/mongodb-standalone/.env.example
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# MongoDB Version
|
||||||
|
MONGO_VERSION=8.0.13
|
||||||
|
|
||||||
|
# MongoDB root credentials
|
||||||
|
MONGO_INITDB_ROOT_USERNAME=root
|
||||||
|
MONGO_INITDB_ROOT_PASSWORD=password
|
||||||
|
|
||||||
|
# Initial database name
|
||||||
|
MONGO_INITDB_DATABASE=admin
|
||||||
|
|
||||||
|
# MongoDB ports configuration
|
||||||
|
MONGO_PORT_OVERRIDE=27017
|
||||||
32
src/mongodb-standalone/docker-compose.yaml
Normal file
32
src/mongodb-standalone/docker-compose.yaml
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
x-default: &default
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- &localtime /etc/localtime:/etc/localtime:ro
|
||||||
|
- &timezone /etc/timezone:/etc/timezone:ro
|
||||||
|
logging:
|
||||||
|
driver: json-file
|
||||||
|
options:
|
||||||
|
max-size: 100m
|
||||||
|
|
||||||
|
services:
|
||||||
|
mongo:
|
||||||
|
<<: *default
|
||||||
|
image: mongo:${MONGO_VERSION:-8.0.13}
|
||||||
|
environment:
|
||||||
|
MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME:-root}
|
||||||
|
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD:-password}
|
||||||
|
MONGO_INITDB_DATABASE: ${MONGO_INITDB_DATABASE:-admin}
|
||||||
|
ports:
|
||||||
|
- "${MONGO_PORT_OVERRIDE:-27017}:27017"
|
||||||
|
volumes:
|
||||||
|
- *localtime
|
||||||
|
- *timezone
|
||||||
|
- mongo_data:/data/db
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpus: '0.50'
|
||||||
|
memory: 1G
|
||||||
|
reservations:
|
||||||
|
cpus: '0.25'
|
||||||
|
memory: 256M
|
||||||
@@ -13,8 +13,8 @@ This service deploys Open WebUI, a web-based interface for LLMs.
|
|||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
- `OPEN_WEBUI_VERSION`: The version of the Open WebUI image, default is `main`.
|
- `OPEN_WEBUI_VERSION`: The version of the Open WebUI image, default is `main`.
|
||||||
- `OPEN_WEBUI_PORT`: The host port for Open WebUI, default is `8080`.
|
- `OPEN_WEBUI_PORT_OVERRIDE`: The host port for Open WebUI, default is `8080`.
|
||||||
|
|
||||||
## Volumes
|
## Volumes
|
||||||
|
|
||||||
- `open-webui`: A volume for storing Open WebUI data.
|
- `open_webui_data`: A volume for storing Open WebUI data.
|
||||||
|
|||||||
@@ -13,8 +13,8 @@
|
|||||||
## 配置
|
## 配置
|
||||||
|
|
||||||
- `OPEN_WEBUI_VERSION`: Open WebUI 镜像的版本,默认为 `main`。
|
- `OPEN_WEBUI_VERSION`: Open WebUI 镜像的版本,默认为 `main`。
|
||||||
- `OPEN_WEBUI_PORT`: Open WebUI 的主机端口,默认为 `8080`。
|
- `OPEN_WEBUI_PORT_OVERRIDE`: Open WebUI 的主机端口,默认为 `8080`。
|
||||||
|
|
||||||
## 卷
|
## 卷
|
||||||
|
|
||||||
- `open-webui`: 用于存储 Open WebUI 数据的卷。
|
- `open_webui_data`: 用于存储 Open WebUI 数据的卷。
|
||||||
|
|||||||
@@ -9,15 +9,15 @@ x-default: &default
|
|||||||
max-size: 100m
|
max-size: 100m
|
||||||
|
|
||||||
services:
|
services:
|
||||||
openwebui:
|
open_webui:
|
||||||
<<: *default
|
<<: *default
|
||||||
image: ghcr.io/open-webui/open-webui:${OPEN_WEBUI_VERSION:-main}
|
image: ghcr.io/open-webui/open-webui:${OPEN_WEBUI_VERSION:-main}
|
||||||
ports:
|
ports:
|
||||||
- "${OPEN_WEBUI_PORT:-8080}:8080"
|
- "${OPEN_WEBUI_PORT_OVERRIDE:-8080}:8080"
|
||||||
volumes:
|
volumes:
|
||||||
- *localtime
|
- *localtime
|
||||||
- *timezone
|
- *timezone
|
||||||
- open-webui:/app/backend/data
|
- open_webui_data:/app/backend/data
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
deploy:
|
deploy:
|
||||||
@@ -30,4 +30,4 @@ services:
|
|||||||
memory: 128M
|
memory: 128M
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
open-webui:
|
open_webui_data:
|
||||||
3
src/opencut/README.md
Normal file
3
src/opencut/README.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# OpenCut
|
||||||
|
|
||||||
|
<https://github.com/OpenCut-app/OpenCut/blob/main/docker-compose.yaml>
|
||||||
91
src/opencut/docker-compose.yaml
Normal file
91
src/opencut/docker-compose.yaml
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
services:
|
||||||
|
db:
|
||||||
|
image: postgres:17
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
POSTGRES_USER: opencut
|
||||||
|
POSTGRES_PASSWORD: opencutthegoat
|
||||||
|
POSTGRES_DB: opencut
|
||||||
|
volumes:
|
||||||
|
- postgres_data:/var/lib/postgresql/data
|
||||||
|
ports:
|
||||||
|
- "5432:5432"
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "pg_isready -U opencut"]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 5
|
||||||
|
start_period: 10s
|
||||||
|
|
||||||
|
redis:
|
||||||
|
image: redis:7-alpine
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "6379:6379"
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "redis-cli", "ping"]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 5
|
||||||
|
start_period: 10s
|
||||||
|
|
||||||
|
serverless-redis-http:
|
||||||
|
image: hiett/serverless-redis-http:latest
|
||||||
|
ports:
|
||||||
|
- "8079:80"
|
||||||
|
environment:
|
||||||
|
SRH_MODE: env
|
||||||
|
SRH_TOKEN: example_token
|
||||||
|
SRH_CONNECTION_STRING: "redis://redis:6379"
|
||||||
|
depends_on:
|
||||||
|
redis:
|
||||||
|
condition: service_healthy
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "wget --spider -q http://127.0.0.1:80 || exit 1"]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 5
|
||||||
|
start_period: 10s
|
||||||
|
web:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: ./apps/web/Dockerfile
|
||||||
|
args:
|
||||||
|
- FREESOUND_CLIENT_ID=${FREESOUND_CLIENT_ID}
|
||||||
|
- FREESOUND_API_KEY=${FREESOUND_API_KEY}
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "3100:3000" # app is running on 3000 so we run this at 3100
|
||||||
|
environment:
|
||||||
|
- NODE_ENV=production
|
||||||
|
- DATABASE_URL=postgresql://opencut:opencutthegoat@db:5432/opencut
|
||||||
|
- BETTER_AUTH_URL=http://localhost:3000
|
||||||
|
- BETTER_AUTH_SECRET=your-production-secret-key-here
|
||||||
|
- UPSTASH_REDIS_REST_URL=http://serverless-redis-http:80
|
||||||
|
- UPSTASH_REDIS_REST_TOKEN=example_token
|
||||||
|
- FREESOUND_CLIENT_ID=${FREESOUND_CLIENT_ID}
|
||||||
|
- FREESOUND_API_KEY=${FREESOUND_API_KEY}
|
||||||
|
# Transcription (Optional - leave blank to disable auto-captions)
|
||||||
|
- CLOUDFLARE_ACCOUNT_ID=${CLOUDFLARE_ACCOUNT_ID}
|
||||||
|
- R2_ACCESS_KEY_ID=${R2_ACCESS_KEY_ID}
|
||||||
|
- R2_SECRET_ACCESS_KEY=${R2_SECRET_ACCESS_KEY}
|
||||||
|
- R2_BUCKET_NAME=${R2_BUCKET_NAME}
|
||||||
|
- MODAL_TRANSCRIPTION_URL=${MODAL_TRANSCRIPTION_URL}
|
||||||
|
depends_on:
|
||||||
|
db:
|
||||||
|
condition: service_healthy
|
||||||
|
serverless-redis-http:
|
||||||
|
condition: service_healthy
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "curl -f http://localhost:3000/api/health || exit 1"]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 5
|
||||||
|
start_period: 30s
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
postgres_data:
|
||||||
|
|
||||||
|
networks:
|
||||||
|
default:
|
||||||
|
name: opencut-network
|
||||||
@@ -14,7 +14,7 @@ This service deploys a PostgreSQL database.
|
|||||||
- `POSTGRES_USER`: The database username, default is `postgres`.
|
- `POSTGRES_USER`: The database username, default is `postgres`.
|
||||||
- `POSTGRES_PASSWORD`: The database password, default is `postgres`.
|
- `POSTGRES_PASSWORD`: The database password, default is `postgres`.
|
||||||
- `POSTGRES_DB`: The database name, default is `postgres`.
|
- `POSTGRES_DB`: The database name, default is `postgres`.
|
||||||
- `POSTGRES_PORT`: The host port for PostgreSQL, default is `5432`.
|
- `POSTGRES_PORT_OVERRIDE`: The host port for PostgreSQL, default is `5432`.
|
||||||
|
|
||||||
## Volumes
|
## Volumes
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
- `POSTGRES_USER`: 数据库用户名,默认为 `postgres`。
|
- `POSTGRES_USER`: 数据库用户名,默认为 `postgres`。
|
||||||
- `POSTGRES_PASSWORD`: 数据库密码,默认为 `postgres`。
|
- `POSTGRES_PASSWORD`: 数据库密码,默认为 `postgres`。
|
||||||
- `POSTGRES_DB`: 数据库名称,默认为 `postgres`。
|
- `POSTGRES_DB`: 数据库名称,默认为 `postgres`。
|
||||||
- `POSTGRES_PORT`: PostgreSQL 的主机端口,默认为 `5432`。
|
- `POSTGRES_PORT_OVERRIDE`: PostgreSQL 的主机端口,默认为 `5432`。
|
||||||
|
|
||||||
## 卷
|
## 卷
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ services:
|
|||||||
# Initialize the database with a custom SQL script
|
# Initialize the database with a custom SQL script
|
||||||
# - ./init.sql:/docker-entrypoint-initdb.d/init.sql
|
# - ./init.sql:/docker-entrypoint-initdb.d/init.sql
|
||||||
ports:
|
ports:
|
||||||
- "${POSTGRES_PORT:-5432}:5432"
|
- "${POSTGRES_PORT_OVERRIDE:-5432}:5432"
|
||||||
deploy:
|
deploy:
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
|
|||||||
Reference in New Issue
Block a user