Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【建议】Feature Docker部署Debian #36

Closed
Fan-Bob opened this issue Jun 18, 2024 · 5 comments
Closed

【建议】Feature Docker部署Debian #36

Fan-Bob opened this issue Jun 18, 2024 · 5 comments
Labels
【建议/adv.】 您对项目的改进想法 【文档/doc】 项目的补充文档

Comments

@Fan-Bob
Copy link

Fan-Bob commented Jun 18, 2024

Debian is best

@Chenyme
Copy link
Owner

Chenyme commented Jun 24, 2024

感谢反馈!后续会考虑的

@Chenyme Chenyme added the 【建议/adv.】 您对项目的改进想法 label Jul 27, 2024
@Chenyme Chenyme changed the title Feature Docker部署Debian 【建议】Feature Docker部署Debian Jul 27, 2024
@dhlsam
Copy link

dhlsam commented Aug 12, 2024

Debian is best

linux 下dockerfile如下,未做测试

Base image with CUDA 12.1 support

FROM nvidia/cuda:12.1.1-cudnn8-runtime-ubuntu20.04

Set environment variables to preconfigure tzdata

ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Asia/Shanghai # Replace with your desired timezone

Set the working directory

WORKDIR /app

Install Python 3, pip, ffmpeg, tzdata, and other dependencies

RUN apt-get update && apt-get install -y
python3
python3-pip
ffmpeg
git
wget
tzdata
&& apt-get clean
&& rm -rf /var/lib/apt/lists/*

Set the pip mirror based on the selected region

ARG REGION
ENV REGION=${REGION}
RUN if [ "$REGION" = "Asia" ]; then
pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple ;
else
pip3 config set global.index-url https://pypi.org/simple ;
fi

Install PyTorch, torchvision, and torchaudio with CUDA 12.1 support

RUN pip3 install torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 --index-url https://download.pytorch.org/whl/cu121

Clone the required GitHub repository

RUN git clone https://github.com/Chenyme/Chenyme-AAVT.git

Create the model/whisper-large-v3 directory and download required files

RUN mkdir -p /app/Chenyme-AAVT/model/whisper-large-v3
&& cd /app/Chenyme-AAVT/model/whisper-large-v3
&& wget https://hf-mirror.com/Systran/faster-whisper-large-v3/resolve/main/README.md
&& wget https://hf-mirror.com/Systran/faster-whisper-large-v3/resolve/main/config.json
&& wget https://hf-mirror.com/Systran/faster-whisper-large-v3/resolve/main/model.bin
&& wget https://hf-mirror.com/Systran/faster-whisper-large-v3/resolve/main/preprocessor_config.json
&& wget https://hf-mirror.com/Systran/faster-whisper-large-v3/resolve/main/tokenizer.json
&& wget https://hf-mirror.com/Systran/faster-whisper-large-v3/resolve/main/vocabulary.json

Set the working directory to the cloned repository

WORKDIR /app/Chenyme-AAVT

Install additional Python dependencies (add any needed packages here)

RUN pip3 install streamlit

Run font_data.py and then start the Streamlit app

CMD ["bash", "-c", "python3 project/font_data.py && streamlit run Chenyme-AAVT.py"]

@Chenyme
Copy link
Owner

Chenyme commented Aug 21, 2024

Debian is best

linux 下dockerfile如下,未做测试

Base image with CUDA 12.1 support

FROM nvidia/cuda:12.1.1-cudnn8-runtime-ubuntu20.04

Set environment variables to preconfigure tzdata

ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Asia/Shanghai # Replace with your desired timezone

Set the working directory

WORKDIR /app

Install Python 3, pip, ffmpeg, tzdata, and other dependencies

RUN apt-get update && apt-get install -y python3 python3-pip ffmpeg git wget tzdata && apt-get clean && rm -rf /var/lib/apt/lists/*

Set the pip mirror based on the selected region

ARG REGION ENV REGION=${REGION} RUN if [ "$REGION" = "Asia" ]; then pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple ; else pip3 config set global.index-url https://pypi.org/simple ; fi

Install PyTorch, torchvision, and torchaudio with CUDA 12.1 support

RUN pip3 install torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 --index-url https://download.pytorch.org/whl/cu121

Clone the required GitHub repository

RUN git clone https://github.com/Chenyme/Chenyme-AAVT.git

Create the model/whisper-large-v3 directory and download required files

RUN mkdir -p /app/Chenyme-AAVT/model/whisper-large-v3 && cd /app/Chenyme-AAVT/model/whisper-large-v3 && wget https://hf-mirror.com/Systran/faster-whisper-large-v3/resolve/main/README.md && wget https://hf-mirror.com/Systran/faster-whisper-large-v3/resolve/main/config.json && wget https://hf-mirror.com/Systran/faster-whisper-large-v3/resolve/main/model.bin && wget https://hf-mirror.com/Systran/faster-whisper-large-v3/resolve/main/preprocessor_config.json && wget https://hf-mirror.com/Systran/faster-whisper-large-v3/resolve/main/tokenizer.json && wget https://hf-mirror.com/Systran/faster-whisper-large-v3/resolve/main/vocabulary.json

Set the working directory to the cloned repository

WORKDIR /app/Chenyme-AAVT

Install additional Python dependencies (add any needed packages here)

RUN pip3 install streamlit

Run font_data.py and then start the Streamlit app

CMD ["bash", "-c", "python3 project/font_data.py && streamlit run Chenyme-AAVT.py"]

感谢!

@Chenyme Chenyme added the 【文档/doc】 项目的补充文档 label Aug 21, 2024
@Chenyme
Copy link
Owner

Chenyme commented Aug 22, 2024

现已支持 Linux Docker 部署~

@Chenyme Chenyme closed this as completed Aug 28, 2024
@solitudealma
Copy link

系统和容器的cuda需要一致吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
【建议/adv.】 您对项目的改进想法 【文档/doc】 项目的补充文档
Projects
None yet
Development

No branches or pull requests

4 participants