Spaces:
Sleeping
Sleeping
feat: init
Browse files- Dockerfile +16 -0
- requirements.txt +6 -0
Dockerfile
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# 使用 python:3.10.9-slim 作为基础镜像
|
2 |
+
FROM python:3.10.9-slim
|
3 |
+
ARG DOWNALOD_SCRIPT
|
4 |
+
# 设置工作目录
|
5 |
+
WORKDIR /app
|
6 |
+
|
7 |
+
# 复制当前目录内容到容器内的 /app 目录
|
8 |
+
COPY . /app
|
9 |
+
|
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
|
requirements.txt
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
fastapi
|
2 |
+
uvicorn
|
3 |
+
requests
|
4 |
+
python-multipart
|
5 |
+
huggingface_hub
|
6 |
+
ffmpeg-python
|