Add Dockerfile to build and run LibreTranslate as a Docker image. Also added a docker-compose.yml file to provide a reproducible way to run the Docker image. And finally added how to build and run the Docker image to the README.md. Tested with local deployment on port 5000 and public HTTPS deployment using a docker based nginx-proxy
This commit is contained in:
parent
fc9c1dc4a4
commit
46693f36c1
3 changed files with 47 additions and 0 deletions
14
Dockerfile
Normal file
14
Dockerfile
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
FROM python:3.8
|
||||
|
||||
RUN pip install --upgrade pip
|
||||
|
||||
# Avoid rebuilding this step if no changes to requirements.txt
|
||||
COPY requirements.txt .
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
# Copy everything in the container
|
||||
# This expects the models submodule to be present
|
||||
COPY . .
|
||||
|
||||
EXPOSE 5000
|
||||
ENTRYPOINT [ "python", "main.py", "--host", "0.0.0.0" ]
|
||||
Loading…
Add table
Add a link
Reference in a new issue