leinier310 commited on
Commit
0e3de8f
·
verified ·
1 Parent(s): 1997cbd

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -7
Dockerfile CHANGED
@@ -3,7 +3,7 @@ FROM python:3.11-slim
3
  # Instala herramientas necesarias
4
  RUN apt-get update && \
5
  apt-get install -y --no-install-recommends \
6
- xz-utils zstd rar wget && \
7
  rm -rf /var/lib/apt/lists/*
8
 
9
  # Carpeta de trabajo fija y limpia
@@ -18,20 +18,20 @@ RUN echo '#!/usr/bin/env python3' > /app/run.py && \
18
  echo 't0 = time.time()' >> /app/run.py && \
19
  echo 'os.system("wget -O ggml-model-i2_s.gguf https://huggingface.co/microsoft/bitnet-b1.58-2B-4T-gguf/resolve/main/ggml-model-i2_s.gguf")' >> /app/run.py && \
20
  echo 'log(f"Descarga completada ({round(time.time()-t0,1)}s)")' >> /app/run.py && \
21
- echo 'log("[2/4] Comprimimos con tar.xz...")' >> /app/run.py && \
22
  echo 't1 = time.time()' >> /app/run.py && \
23
  echo 'os.system("tar -c -f model.tar.xz -I \\"xz -9e -T0\\" ggml-model-i2_s.gguf")' >> /app/run.py && \
24
  echo 'log(f"XZ listo ({round(time.time()-t1,1)}s)")' >> /app/run.py && \
25
- echo 'log("[3/4] Comprimimos con tar.zst...")' >> /app/run.py && \
26
  echo 't2 = time.time()' >> /app/run.py && \
27
  echo 'os.system("tar -c -f model.tar.zst --zstd -I \\"zstd -19 -T0\\" ggml-model-i2_s.gguf")' >> /app/run.py && \
28
  echo 'log(f"ZSTD listo ({round(time.time()-t2,1)}s)")' >> /app/run.py && \
29
- echo 'log("[4/4] Comprimimos con RAR...")' >> /app/run.py && \
30
  echo 't3 = time.time()' >> /app/run.py && \
31
- echo 'os.system("rar a -ma5 model.rar ggml-model-i2_s.gguf")' >> /app/run.py && \
32
- echo 'log(f"RAR listo ({round(time.time()-t3,1)}s)")' >> /app/run.py && \
33
  echo 'log("Tamaños finales:")' >> /app/run.py && \
34
- echo 'os.system("du -h *.gguf *.xz *.zst *.rar")' >> /app/run.py && \
35
  echo 'log("Servidor HTTP activo en puerto 7860")' >> /app/run.py && \
36
  echo 'os.system("python3 -m http.server 7860")' >> /app/run.py
37
 
 
3
  # Instala herramientas necesarias
4
  RUN apt-get update && \
5
  apt-get install -y --no-install-recommends \
6
+ xz-utils zstd wget && \
7
  rm -rf /var/lib/apt/lists/*
8
 
9
  # Carpeta de trabajo fija y limpia
 
18
  echo 't0 = time.time()' >> /app/run.py && \
19
  echo 'os.system("wget -O ggml-model-i2_s.gguf https://huggingface.co/microsoft/bitnet-b1.58-2B-4T-gguf/resolve/main/ggml-model-i2_s.gguf")' >> /app/run.py && \
20
  echo 'log(f"Descarga completada ({round(time.time()-t0,1)}s)")' >> /app/run.py && \
21
+ echo 'log("[2/4] Comprimiendo con tar.xz...")' >> /app/run.py && \
22
  echo 't1 = time.time()' >> /app/run.py && \
23
  echo 'os.system("tar -c -f model.tar.xz -I \\"xz -9e -T0\\" ggml-model-i2_s.gguf")' >> /app/run.py && \
24
  echo 'log(f"XZ listo ({round(time.time()-t1,1)}s)")' >> /app/run.py && \
25
+ echo 'log("[3/4] Comprimiendo con tar.zst...")' >> /app/run.py && \
26
  echo 't2 = time.time()' >> /app/run.py && \
27
  echo 'os.system("tar -c -f model.tar.zst --zstd -I \\"zstd -19 -T0\\" ggml-model-i2_s.gguf")' >> /app/run.py && \
28
  echo 'log(f"ZSTD listo ({round(time.time()-t2,1)}s)")' >> /app/run.py && \
29
+ #echo 'log("[4/4] Comprimimos con RAR...")' >> /app/run.py && \
30
  echo 't3 = time.time()' >> /app/run.py && \
31
+ #echo 'os.system("rar a -ma5 model.rar ggml-model-i2_s.gguf")' >> /app/run.py && \
32
+ #echo 'log(f"RAR listo ({round(time.time()-t3,1)}s)")' >> /app/run.py && \
33
  echo 'log("Tamaños finales:")' >> /app/run.py && \
34
+ echo 'os.system("du -h *.gguf *.xz *.zst")' >> /app/run.py && \
35
  echo 'log("Servidor HTTP activo en puerto 7860")' >> /app/run.py && \
36
  echo 'os.system("python3 -m http.server 7860")' >> /app/run.py
37