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

24 lines
440 B
Docker
Raw Normal View History

FROM python:3.8
ARG with_models=false
2021-01-19 18:57:29 +01:00
WORKDIR /app
RUN pip install --upgrade pip
2021-02-09 14:17:06 +01:00
COPY . .
# check for offline build
RUN if [ "$with_models" = "true" ]; then \
# install only the dependencies first
pip install -e .; \
# initialize the language models
./install_models.py; \
fi
2021-02-09 14:17:06 +01:00
# Install package from source code
RUN pip install .
EXPOSE 5000
2021-02-09 14:17:06 +01:00
ENTRYPOINT [ "libretranslate", "--host", "0.0.0.0" ]