forked from YaoFANGUK/video-subtitle-extractor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
31 lines (24 loc) · 1.12 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# 使用带有CUDA 11.8支持的Ubuntu 20.04镜像作为基础镜像 https://hub.docker.com/
FROM nvidia/cuda:11.7.1-cudnn8-devel-ubuntu20.04
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Asia/Shanghai
# 安装您的应用程序需要的其他依赖项
RUN apt-get update && apt-get install -y \
python3-pip build-essential \
&& rm -rf /var/lib/apt/lists/*
# 安装ffmpeg
RUN apt-get update && apt-get install -y --no-install-recommends ffmpeg && rm -rf /var/lib/apt/lists/*
# 将您的应用程序代码复制到容器内
COPY . /app
WORKDIR /app
# 安装Python依赖
RUN cd /app
RUN pip install --upgrade cython -i https://pypi.tuna.tsinghua.edu.cn/simple
#RUN pip install --upgrade scikit-learn
RUN pip install -r requirements_gpu.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
RUN python3 -m pip install paddlepaddle-gpu==2.4.2.post117 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html
#RUN pip install torch==2.0.1 torchvision==0.15.2 --index-url https://download.pytorch.org/whl/cu118
RUN pip install torch==2.0.1 torchvision==0.15.2
EXPOSE 8003
# 指定容器启动时执行的命令
CMD ["python3", "app.py"]