cool commited on
Commit
67d3b01
·
verified ·
1 Parent(s): 4a9f14a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -5
Dockerfile CHANGED
@@ -11,15 +11,21 @@ RUN mkdir -p /.local && chmod -R 777 /.local && \
11
  # Set HOME to a writable directory
12
  ENV HOME=/app
13
 
14
- # Download and install the Kabyle model
15
- RUN curl -L -o /app/en_kab_comp.argosmodel \
16
- https://huggingface.co/spaces/axxam/LibreTranslate_Kabyle/resolve/main/en_kab_comp.argosmodel && \
17
- /app/venv/bin/python3 -c "import argostranslate.package; argostranslate.package.install_from_path('/app/en_kab_comp.argosmodel')"
 
 
 
 
 
 
18
 
19
  # Set environment variables
20
  ENV LT_HOST="0.0.0.0"
21
  ENV LT_PORT="7860"
22
- ENV LT_LOAD_ONLY="en,fr,kab_comp"
23
  ENV LT_SSL=True
24
 
25
  ENTRYPOINT ["/app/venv/bin/libretranslate"]
 
11
  # Set HOME to a writable directory
12
  ENV HOME=/app
13
 
14
+ # Create model folder
15
+ RUN mkdir -p /app/models
16
+
17
+ # Copy model files and installer script
18
+ COPY en_kab_comp.argosmodel /app/models/en_kab_comp.argosmodel
19
+ COPY translate-en_kab.argosmodel /app/models/translate-en_kab.argosmodel
20
+ COPY install_model.py /app/install_model.py
21
+
22
+ # Install models
23
+ RUN /app/venv/bin/python3 /app/install_model.py
24
 
25
  # Set environment variables
26
  ENV LT_HOST="0.0.0.0"
27
  ENV LT_PORT="7860"
28
+ ENV LT_LOAD_ONLY="en,fr,kab,kab_comp"
29
  ENV LT_SSL=True
30
 
31
  ENTRYPOINT ["/app/venv/bin/libretranslate"]