Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion builder/store/database/deploy_task.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ type Deploy struct {
SecureLevel int `json:"secure_level"`
// 0-space, 1-inference, 2-finetune, 3-serverless, 4-evaluation, 5-notebook
Type int `json:"type"`
Task types.PipelineTask `bun:",nullzero" json:"task"` //text-generation,text-to-image
Task types.PipelineTask `bun:",nullzero" json:"task"` //text-generation,text-to-image,text-to-speech
UserUUID string `bun:"," json:"user_uuid"`
SKU string `bun:"," json:"sku"`
OrderDetailID int64 `bun:"," json:"order_detail_id"`
Expand Down
1 change: 1 addition & 0 deletions common/types/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ const (
SentenceSimilarity PipelineTask = "sentence-similarity"
TaskAutoDetection PipelineTask = "task-auto-detection"
VideoText2Text PipelineTask = "video-text-to-text"
TextToSpeech PipelineTask = "text-to-speech"
LlamaCpp InferenceEngine = "llama.cpp"
TEI InferenceEngine = "tei"
Ktransformers InferenceEngine = "ktransformers"
Expand Down
3 changes: 3 additions & 0 deletions component/callback/git_callback.go
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,9 @@ func GetPipelineTaskFromTags(tags []database.Tag) types.PipelineTask {
if tag.Name == string(types.Text2Image) {
return types.Text2Image
}
if tag.Name == string(types.TextToSpeech) {
return types.TextToSpeech
}
}
return ""
}
Expand Down
3 changes: 3 additions & 0 deletions component/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -1370,6 +1370,9 @@ func GetBuiltInTaskFromTags(tags []database.Tag) string {
if tag.Name == string(types.ImageText2Text) {
return tag.Name
}
if tag.Name == string(types.TextToSpeech) {
return tag.Name
}
}
return string(types.TextGeneration)
}
Expand Down
20 changes: 20 additions & 0 deletions configs/inference/audio-fish.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"engine_name": "hf-inference-toolkit",
"enabled": 1,
"container_port": 8000,
"model_format": "safetensors",
"engine_images": [
{
"compute_type": "gpu",
"image": "opencsghq/fish-speech:server-cuda",
"driver_version": "12.6",
"engine_version": "1.5.1"
},
{
"compute_type": "cpu",
"image": "opencsghq/fish-speech:server-cpu",
"engine_version": "1.5.1"
}
],
"supported_models": ["openaudio-s1-mini"]
}
27 changes: 27 additions & 0 deletions docker/inference/Dockerfile.fishaudio-cpu
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM docker.1ms.run/fishaudio/fish-speech:server-cpu
USER root
RUN apt-get update && \
apt-get install -y dumb-init && apt-get clean && rm -rf /var/lib/apt/lists/*

# Switch to the user from base image (fish, UID 1000) to install packages
# Install directly into the virtual environment to avoid uv sync delays
USER 1000:1000
WORKDIR /app
# Configure pip to use Aliyun mirror and install into the virtual environment
RUN pip config set global.index-url https://mirrors.aliyun.com/pypi/simple && \
uv pip install --no-cache-dir csghub-sdk==0.7.10

USER root
COPY ./fishaudio/ /etc/csghub/
RUN chmod +x /etc/csghub/*.sh

WORKDIR /workspace/
RUN curl -L -o references.tar.gz https://git-devops.opencsg.com/opensource/public_files/-/raw/main/references.tar.gz && \
tar -xzf references.tar.gz && \
rm references.tar.gz
ENV HUGGINGFACE_HUB_CACHE=/workspace/ \
HF_HUB_ENABLE_HF_TRANSFER=0
ENV PORT=8000
EXPOSE 8000
ENTRYPOINT [ "/usr/bin/dumb-init", "--" ]
CMD ["/etc/csghub/serve.sh"]
27 changes: 27 additions & 0 deletions docker/inference/Dockerfile.fishaudio-gpu
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM docker.1ms.run/fishaudio/fish-speech:server-cuda

USER root
RUN apt-get update && \
apt-get install -y dumb-init && apt-get clean && rm -rf /var/lib/apt/lists/*

# Switch to the user from base image (fish, UID 1000) to install packages
# Install directly into the virtual environment to avoid uv sync delays
USER 1000:1000
WORKDIR /app
RUN uv pip install --index-url https://mirrors.aliyun.com/pypi/simple --no-cache-dir csghub-sdk==0.7.10

USER root
COPY ./fishaudio/ /etc/csghub/
RUN chmod +x /etc/csghub/*.sh

WORKDIR /workspace/
RUN curl -L -o references.tar.gz https://git-devops.opencsg.com/opensource/public_files/-/raw/main/references.tar.gz && \
tar -xzf references.tar.gz && \
rm references.tar.gz
ENV HUGGINGFACE_HUB_CACHE=/workspace/ \
HF_HUB_ENABLE_HF_TRANSFER=0
ENV PORT=8000
ENV COMPILE=1
EXPOSE 8000
ENTRYPOINT [ "/usr/bin/dumb-init", "--" ]
CMD ["/etc/csghub/serve.sh"]
Loading
Loading