1
0
mirror of https://github.com/LibreTranslate/LibreTranslate.git synced 2024-11-14 19:50:11 +01:00

fix: make libretranslate with ipv6

This commit is contained in:
Cyril Levis 2024-03-06 10:37:47 +01:00
parent 74a7831962
commit b25ed7aae4
No known key found for this signature in database
GPG Key ID: 6DB88737C11F5A48
4 changed files with 4 additions and 4 deletions

View File

@ -42,4 +42,4 @@ RUN if [ "$with_models" = "true" ]; then \
fi
EXPOSE 5000
ENTRYPOINT [ "./venv/bin/libretranslate", "--host", "0.0.0.0" ]
ENTRYPOINT [ "./venv/bin/libretranslate", "--host", "::" ]

View File

@ -40,4 +40,4 @@ RUN if [ "$with_models" = "true" ]; then \
fi
EXPOSE 5000
ENTRYPOINT [ "./venv/bin/libretranslate", "--host", "0.0.0.0" ]
ENTRYPOINT [ "./venv/bin/libretranslate", "--host", "::" ]

View File

@ -42,4 +42,4 @@ RUN pip3 install Babel==2.12.1 && python3 scripts/compile_locales.py \
# ENV LD_LIBRARY_PATH=/usr/local/cuda/lib:/usr/local/cuda/lib64
EXPOSE 5000
ENTRYPOINT [ "libretranslate", "--host", "0.0.0.0" ]
ENTRYPOINT [ "libretranslate", "--host", "::" ]

View File

@ -1,7 +1,7 @@
import requests
response = requests.post(
url='http://0.0.0.0:5000/translate',
url='http://[::1]:5000/translate',
headers={'Content-Type': 'application/json'},
json={
'q': 'Hello World!',