HirCoir commited on
Commit
b19ba5e
1 Parent(s): c474e64

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +49 -0
Dockerfile ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM debian:11
2
+
3
+ # Variables de entorno
4
+ #Variables a modificar
5
+ ENV TOKEN="jipsuljWyQrQNHoqfjDupxdLvSmlHInmNN"
6
+ ENV MODEL_TO_CONVERT="cognitivecomputations/dolphin-2.5-mixtral-8x7b"
7
+ ENV DEST_REPO="HirCoir/dolphin-2.5-mixtral-8x7b-GGUF"
8
+
9
+ ENV REPO="https://github.com/ggerganov/llama.cpp"
10
+ ENV PREFIX="hf_"
11
+ ENV TOKEN_CONCATENADO="${PREFIX}${TOKEN}"
12
+ ENV MODEL_DIR="/model"
13
+ ENV MODEL_FILES="${MODEL_DIR}/*.gguf"
14
+ # Agrega un usuario no root
15
+ RUN useradd -m -u 1000 app
16
+ # Establece el directorio de trabajo dentro del contenedor
17
+ WORKDIR /home/app
18
+
19
+ RUN apt update
20
+ RUN apt install -y \
21
+ make \
22
+ cmake \
23
+ clang \
24
+ gcc \
25
+ git \
26
+ curl \
27
+ sudo \
28
+ python3-dev \
29
+ python3 \
30
+ python3-pip \
31
+ python3-venv \
32
+ git espeak-ng
33
+
34
+ WORKDIR /root
35
+ RUN git clone https://github.com/rhasspy/piper
36
+ RUN pip install -q cython>=0.29.0 espeak-phonemizer>=1.1.0 librosa>=0.9.2 numpy>=1.19.0 pytorch-lightning~=1.7.0 torch~=1.11.0
37
+ RUN pip install -q onnx onnxruntime
38
+ RUN pip install -q torchtext==0.12.0
39
+
40
+ WORKDIR /root/piper/src/python
41
+ RUN bash build_monotonic_align.sh
42
+ RUN pip install -q torchaudio==0.11.0 torchmetrics==0.11.4
43
+ RUN pip install --upgrade gdown
44
+ RUN apt install -y zip unzip wget curl
45
+ RUN pip install -U "huggingface_hub[cli]"
46
+
47
+ # Descarga del modelo en la carpeta especificada
48
+ RUN huggingface-cli download ${MODEL_TO_CONVERT} --local-dir ${MODEL_DIR}
49
+ RUN ls; sleep 30