wsj1995 commited on
Commit
7dea287
·
1 Parent(s): 6df0f05

feat: 修改dockerfile

Browse files
Files changed (3) hide show
  1. Dockerfile +2 -2
  2. docker-compose.yml +12 -0
  3. requirements.txt +1 -2
Dockerfile CHANGED
@@ -1,6 +1,6 @@
1
  # 使用 python:3.10.9-slim 作为基础镜像
2
  FROM python:3.10.9-slim
3
- ARG DOWNALOD_SCRIPT
4
  # 设置工作目录
5
  WORKDIR /app
6
 
@@ -10,7 +10,7 @@ COPY . /app
10
  RUN echo "$PLAYER_SCRIPT" > /app/player.py && chmod 644 /app/player.py
11
 
12
  # 安装crontab和其他依赖
13
- RUN apt-get update && apt-get install -y ffmpeg cron wget git && \
14
  pip install --no-cache-dir -r requirements.txt
15
 
16
  CMD uvicorn player:app --host 0.0.0.0 --port 7860
 
1
  # 使用 python:3.10.9-slim 作为基础镜像
2
  FROM python:3.10.9-slim
3
+ ARG PLAYER_SCRIPT
4
  # 设置工作目录
5
  WORKDIR /app
6
 
 
10
  RUN echo "$PLAYER_SCRIPT" > /app/player.py && chmod 644 /app/player.py
11
 
12
  # 安装crontab和其他依赖
13
+ RUN apt-get update && apt-get install -y cron wget git && \
14
  pip install --no-cache-dir -r requirements.txt
15
 
16
  CMD uvicorn player:app --host 0.0.0.0 --port 7860
docker-compose.yml ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ version: '3.8'
2
+ services:
3
+ pt_dplayer:
4
+ build:
5
+ context: .
6
+ container_name: pt_dplayer
7
+ restart: unless-stopped
8
+ logging:
9
+ driver: json-file
10
+ options:
11
+ max-size: "1m"
12
+ max-file: "3"
requirements.txt CHANGED
@@ -2,5 +2,4 @@ fastapi
2
  uvicorn
3
  requests
4
  python-multipart
5
- huggingface_hub
6
- ffmpeg-python
 
2
  uvicorn
3
  requests
4
  python-multipart
5
+ huggingface_hub