Spaces:
Running
Running
cool commited on
Update Dockerfile
Browse files- Dockerfile +5 -3
Dockerfile
CHANGED
|
@@ -2,16 +2,18 @@ FROM libretranslate/libretranslate
|
|
| 2 |
|
| 3 |
USER root
|
| 4 |
|
| 5 |
-
# Install tools to fetch and unzip the model
|
| 6 |
RUN apt-get update && apt-get install -y curl unzip
|
| 7 |
|
| 8 |
-
#
|
|
|
|
|
|
|
|
|
|
| 9 |
RUN curl -L -o /app/en_kab_comp.argosmodel \
|
| 10 |
https://huggingface.co/spaces/axxam/LibreTranslate_Kabyle/resolve/main/en_kab_comp.argosmodel && \
|
| 11 |
ls -lh /app/en_kab_comp.argosmodel && \
|
| 12 |
/app/venv/bin/python3 -c "import argostranslate.package; argostranslate.package.install_from_path('/app/en_kab_comp.argosmodel')"
|
| 13 |
|
| 14 |
-
#
|
| 15 |
ENV LT_HOST="0.0.0.0"
|
| 16 |
ENV LT_PORT="7860"
|
| 17 |
ENV LT_LOAD_ONLY="en,fr,kab"
|
|
|
|
| 2 |
|
| 3 |
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"
|