Kiy-K commited on
Commit
2d68c0d
·
verified ·
1 Parent(s): 408e9b6

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -15
Dockerfile CHANGED
@@ -1,37 +1,44 @@
1
  # ===========================================================================
2
- # 🐳 KIYENGINE V6 - TERMINAL UI EDITION
3
  # ===========================================================================
4
- # 1. Setup môi trường Python.
5
- # 2. Clone Lichess-Bot.
6
- # 3. Copy Engine & Config.
7
- # 4. Chạy App.py (Web Terminal + Bot).
8
  # ===========================================================================
9
 
10
- FROM python:3.11-slim-bookworm
11
 
12
  WORKDIR /app
13
 
14
- # 1. Cài git để clone repo bot
15
  RUN apt-get update && \
16
- apt-get install -y --no-install-recommends git && \
17
- rm -rf /var/lib/apt/lists/*
 
 
18
 
19
- # 2. Clone Lichess-Bot chính chủ
 
 
 
20
  RUN git clone https://github.com/lichess-bot-devs/lichess-bot.git .
21
 
22
- # 3. Cài đặt thư viện
23
- RUN pip install --no-cache-dir -r requirements.txt && \
24
- pip install flask
25
 
26
  # 4. SETUP ENGINE
27
  RUN mkdir -p engines
28
 
29
- # 👉 COPY BINARY (Đổi tên thành kiy_engine cho khớp config)
30
  COPY kiy_engine_v5_alpha ./engines/kiy_engine
31
 
32
  # 👉 COPY MODEL
33
  COPY kiyengine.gguf ./engines/
34
 
 
 
 
35
  # 👉 COPY CONFIG & APP
36
  COPY config.yml .
37
  COPY app.py .
@@ -47,5 +54,4 @@ USER kiyuser
47
  EXPOSE 7860
48
 
49
  # 8. LỆNH CHẠY
50
- # Chạy app.py (Nó sẽ tự bật Web Server và Bot process bên trong)
51
  CMD ["python3", "app.py"]
 
1
  # ===========================================================================
2
+ # 🐳 KIYENGINE V6 - TERMINAL UI (UBUNTU 24.04 GLIBC FIX)
3
  # ===========================================================================
4
+ # 1. Base: Ubuntu 24.04 (Fix lỗi GLIBC 2.39).
5
+ # 2. Fix: Symlink model.
6
+ # 3. Chạy App.py (Terminal UI).
 
7
  # ===========================================================================
8
 
9
+ FROM ubuntu:24.04
10
 
11
  WORKDIR /app
12
 
13
+ # 1. Cài đặt Python công cụ cần thiết
14
  RUN apt-get update && \
15
+ apt-get install -y --no-install-recommends \
16
+ python3 python3-pip python3-venv \
17
+ git curl ca-certificates bash procps \
18
+ && rm -rf /var/lib/apt/lists/*
19
 
20
+ # Bỏ qua lỗi PEP 668 để cài pip trên Ubuntu 24.04
21
+ ENV PIP_BREAK_SYSTEM_PACKAGES=1
22
+
23
+ # 2. Clone Lichess-Bot
24
  RUN git clone https://github.com/lichess-bot-devs/lichess-bot.git .
25
 
26
+ # 3. Cài đặt thư viện + Flask
27
+ RUN pip3 install --no-cache-dir -r requirements.txt && \
28
+ pip3 install flask
29
 
30
  # 4. SETUP ENGINE
31
  RUN mkdir -p engines
32
 
33
+ # 👉 COPY BINARY (Đổi tên thành kiy_engine)
34
  COPY kiy_engine_v5_alpha ./engines/kiy_engine
35
 
36
  # 👉 COPY MODEL
37
  COPY kiyengine.gguf ./engines/
38
 
39
+ # 🛠️ FIX PATH: TẠO SYMLINK MODEL RA ROOT
40
+ RUN ln -s ./engines/kiyengine.gguf ./kiyengine.gguf
41
+
42
  # 👉 COPY CONFIG & APP
43
  COPY config.yml .
44
  COPY app.py .
 
54
  EXPOSE 7860
55
 
56
  # 8. LỆNH CHẠY
 
57
  CMD ["python3", "app.py"]