ray-lei commited on
Commit
c66d537
·
verified ·
1 Parent(s): af8751b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -16
Dockerfile CHANGED
@@ -1,17 +1,7 @@
1
- FROM nvidia/cuda:12.1.1-runtime-ubuntu22.04
2
-
3
- # 1. 基础依赖
4
- RUN apt-get update && apt-get install -y \
5
- python3 python3-pip git && \
6
- rm -rf /var/lib/apt/lists/*
7
-
8
- # 2. 安装依赖
9
- RUN pip install --upgrade pip
10
- RUN pip install vllm fastapi uvicorn huggingface_hub
11
-
12
- # 3. 复制代码
13
  WORKDIR /app
14
- COPY app.py /app
15
-
16
- # 4. 启动命令 (FastAPI)
17
- CMD ["python3", "app.py"]
 
 
1
+ FROM python:3.10-slim
 
 
 
 
 
 
 
 
 
 
 
2
  WORKDIR /app
3
+ COPY . /app
4
+ RUN pip install --no-cache-dir --upgrade pip && \
5
+ pip install --no-cache-dir -r requirements.txt
6
+ EXPOSE 7860
7
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]