-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
183 additions
and
103 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 |
---|---|---|
@@ -1,9 +1,11 @@ | ||
# FROM docker.rainbond.cc/506610466/cuda:12.2.0-runtime-ubuntu20.04-uv | ||
FROM 506610466/cuda:12.2.0-runtime-ubuntu20.04-uv | ||
# FROM 506610466/cuda:12.2.0-runtime-ubuntu20.04-uv | ||
# 从基础镜像开始构建,加快构建速度 | ||
FROM 506610466/gpt_server:base | ||
COPY ./ /gpt_server | ||
WORKDIR /gpt_server | ||
|
||
RUN uv venv --seed && uv sync && uv cache clean && \ | ||
echo '[[ -f .venv/bin/activate ]] && source .venv/bin/activate' >> ~/.bashrc | ||
RUN uv sync && uv cache clean | ||
# RUN uv venv --seed && uv sync && uv cache clean && \ | ||
# echo '[[ -f .venv/bin/activate ]] && source .venv/bin/activate' >> ~/.bashrc | ||
|
||
CMD ["/bin/bash"] |
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
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
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from pathlib import Path | ||
from openai import OpenAI | ||
|
||
# 新版本 opnai | ||
client = OpenAI(api_key="EMPTY", base_url="http://localhost:8082/v1") | ||
speech_file_path = Path(__file__).parent / "speech.mp3" | ||
response = client.audio.speech.create( | ||
model="edge_tts", | ||
voice="zh-CN-YunxiNeural", | ||
input="你好啊,我是人工智能。", | ||
) | ||
response.write_to_file(speech_file_path) |
Oops, something went wrong.