cool commited on
Commit
8a1ddd3
·
verified ·
1 Parent(s): a158293

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -4
Dockerfile CHANGED
@@ -4,16 +4,19 @@ USER root
4
 
5
  RUN apt-get update && apt-get install -y curl unzip
6
 
7
- # Set HOME to writable directory
 
 
 
 
8
  ENV HOME=/app
9
 
10
- # Download and install Kabyle model
11
  RUN curl -L -o /app/en_kab_comp.argosmodel \
12
  https://huggingface.co/spaces/axxam/LibreTranslate_Kabyle/resolve/main/en_kab_comp.argosmodel && \
13
- ls -lh /app/en_kab_comp.argosmodel && \
14
  /app/venv/bin/python3 -c "import argostranslate.package; argostranslate.package.install_from_path('/app/en_kab_comp.argosmodel')"
15
 
16
- # Configure environment
17
  ENV LT_HOST="0.0.0.0"
18
  ENV LT_PORT="7860"
19
  ENV LT_LOAD_ONLY="en,fr,kab"
 
4
 
5
  RUN apt-get update && apt-get install -y curl unzip
6
 
7
+ # Make .local and session DB directories writable
8
+ RUN mkdir -p /.local && chmod -R 777 /.local && \
9
+ mkdir -p /app/db/sessions && chmod -R 777 /app/db
10
+
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"