Kiy-K commited on
Commit
d90215c
·
verified ·
1 Parent(s): d1d9f4d

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -14
Dockerfile CHANGED
@@ -1,15 +1,12 @@
1
  # ===========================================================================
2
- # 🐳 KIYENGINE V6.1 - HF SPACE (ULTRA MINIMALIST EDITION)
3
- # ===========================================================================
4
- # Binary đã embed toàn bộ NNUE, GGUF và Books.
5
- # Chỉ cần copy đúng 1 file thực thi và config là chạy!
6
  # ===========================================================================
7
 
8
  FROM ubuntu:24.04
9
 
10
  WORKDIR /app
11
 
12
- # 1. Cài đặt Python và các công cụ bản
13
  RUN apt-get update && \
14
  apt-get install -y --no-install-recommends \
15
  python3 python3-pip python3-venv \
@@ -18,28 +15,27 @@ RUN apt-get update && \
18
 
19
  ENV PIP_BREAK_SYSTEM_PACKAGES=1
20
 
21
- # 2. Clone Lichess-Bot (Làm nền tảng kết nối)
22
  RUN git clone https://github.com/lichess-bot-devs/lichess-bot.git .
23
 
24
- # 3. Nạp file ông giáo upload lên HF Space vào thư mục tạm
 
 
 
 
25
  COPY . /hf_upload/
26
 
27
- # 4. TỔ CHỨC FILE (Siêu gọn)
28
  RUN mkdir -p engines && \
29
  # Bắt chính xác tên file binary (đã nhúng tất cả) và đổi tên thành kiy_engine
30
- cp /hf_upload/kiyengine-linux-x86_64 engines/kiy_engine && \
31
  chmod +x engines/kiy_engine && \
32
  # Copy các file Python & Config
33
  cp /hf_upload/config.yml . 2>/dev/null || true && \
34
  cp /hf_upload/app.py . 2>/dev/null || true && \
35
- cp /hf_upload/requirements.txt . 2>/dev/null || true && \
36
  # Dọn dẹp thư mục tạm
37
  rm -rf /hf_upload
38
 
39
- # 5. Cài đặt thư viện Python
40
- RUN pip3 install --no-cache-dir -r requirements.txt && \
41
- pip3 install flask
42
-
43
  # 6. Thiết lập User an toàn (Bắt buộc cho HF Spaces)
44
  RUN useradd -m kiyuser && chown -R kiyuser:kiyuser /app
45
  USER kiyuser
 
1
  # ===========================================================================
2
+ # 🐳 KIYENGINE V6.1 - HF SPACE (FIX MISSING MODULE)
 
 
 
3
  # ===========================================================================
4
 
5
  FROM ubuntu:24.04
6
 
7
  WORKDIR /app
8
 
9
+ # 1. Cài đặt công cụ hệ thống
10
  RUN apt-get update && \
11
  apt-get install -y --no-install-recommends \
12
  python3 python3-pip python3-venv \
 
15
 
16
  ENV PIP_BREAK_SYSTEM_PACKAGES=1
17
 
18
+ # 2. Clone Lichess-Bot
19
  RUN git clone https://github.com/lichess-bot-devs/lichess-bot.git .
20
 
21
+ # 3. CÀI ĐẶT THƯ VIỆN CỦA LICHESS-BOT TRƯỚC! (Rất quan trọng)
22
+ RUN pip3 install --no-cache-dir -r requirements.txt && \
23
+ pip3 install --no-cache-dir flask
24
+
25
+ # 4. Nạp file ông giáo upload lên HF Space vào thư mục tạm
26
  COPY . /hf_upload/
27
 
28
+ # 5. TỔ CHỨC FILE (Gắn Binary và Config)
29
  RUN mkdir -p engines && \
30
  # Bắt chính xác tên file binary (đã nhúng tất cả) và đổi tên thành kiy_engine
31
+ cp /hf_upload/kiyengine-linux-x86_64 engines/kiy_engine 2>/dev/null || true && \
32
  chmod +x engines/kiy_engine && \
33
  # Copy các file Python & Config
34
  cp /hf_upload/config.yml . 2>/dev/null || true && \
35
  cp /hf_upload/app.py . 2>/dev/null || true && \
 
36
  # Dọn dẹp thư mục tạm
37
  rm -rf /hf_upload
38
 
 
 
 
 
39
  # 6. Thiết lập User an toàn (Bắt buộc cho HF Spaces)
40
  RUN useradd -m kiyuser && chown -R kiyuser:kiyuser /app
41
  USER kiyuser