You've already forked LibreTranslate
							
							
				mirror of
				https://github.com/LibreTranslate/LibreTranslate.git
				synced 2025-10-30 23:37:48 +02:00 
			
		
		
		
	
		
			
				
	
	
		
			24 lines
		
	
	
		
			440 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			440 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
| FROM python:3.8
 | |
| 
 | |
| ARG with_models=false
 | |
| 
 | |
| WORKDIR /app
 | |
| 
 | |
| RUN pip install --upgrade pip
 | |
| 
 | |
| 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
 | |
| 
 | |
| # Install package from source code
 | |
| RUN pip install .
 | |
| 
 | |
| EXPOSE 5000
 | |
| ENTRYPOINT [ "libretranslate", "--host", "0.0.0.0" ]
 |