izuemon commited on
Commit
54e6e0a
·
verified ·
1 Parent(s): ba9d02a

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +46 -0
Dockerfile ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # system packages
6
+ RUN apt-get update && apt-get install -y \
7
+ git \
8
+ git-lfs \
9
+ ffmpeg \
10
+ libsm6 \
11
+ libxext6 \
12
+ cmake \
13
+ rsync \
14
+ libgl1 \
15
+ build-essential \
16
+ && rm -rf /var/lib/apt/lists/* \
17
+ && git lfs install
18
+
19
+ # upgrade pip
20
+ RUN pip install --no-cache-dir -U pip
21
+
22
+ # python utilities
23
+ RUN pip install --no-cache-dir \
24
+ datasets \
25
+ "huggingface-hub>=0.30" \
26
+ "hf-transfer>=0.1.4" \
27
+ "protobuf<4" \
28
+ "click<8.1" \
29
+ "uvicorn>=0.14.0" \
30
+ "websockets>=10.4" \
31
+ spaces \
32
+ "gradio[oauth,mcp]==6.9.0"
33
+
34
+ # torch を先に入れる
35
+ RUN pip install --no-cache-dir torch==2.3.1
36
+
37
+ # requirements
38
+ COPY requirements.txt .
39
+
40
+ # flash-attn を含む残り
41
+ RUN pip install --no-cache-dir -r requirements.txt
42
+
43
+ # source
44
+ COPY . .
45
+
46
+ CMD ["python", "app.py"]