mirror of
				https://github.com/immich-app/immich.git
				synced 2025-11-03 19:29:32 -05:00 
			
		
		
		
	* default NODE_ENV to production for server image * update node image to use 3.17 alpine in server * update web docker image to use alpine 3.17 * remove NODE_ENV from production docker-compose * NODE_ENV is also needed default in machine-learning
		
			
				
	
	
		
			28 lines
		
	
	
		
			707 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			707 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
FROM python:3.10 as builder
 | 
						|
 | 
						|
ENV PYTHONDONTWRITEBYTECODE=1 \
 | 
						|
    PYTHONUNBUFFERED=1 \
 | 
						|
    PIP_NO_CACHE_DIR=true
 | 
						|
 | 
						|
RUN python -m venv /opt/venv
 | 
						|
RUN /opt/venv/bin/pip install --pre torch  -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
 | 
						|
RUN /opt/venv/bin/pip install transformers tqdm numpy scikit-learn scipy nltk sentencepiece flask Pillow gunicorn
 | 
						|
RUN /opt/venv/bin/pip install --no-deps sentence-transformers
 | 
						|
 | 
						|
FROM python:3.10-slim
 | 
						|
 | 
						|
ENV NODE_ENV=production
 | 
						|
 | 
						|
COPY --from=builder /opt/venv /opt/venv
 | 
						|
 | 
						|
ENV TRANSFORMERS_CACHE=/cache \
 | 
						|
    PYTHONDONTWRITEBYTECODE=1 \
 | 
						|
    PYTHONUNBUFFERED=1 \
 | 
						|
    PATH="/opt/venv/bin:$PATH"
 | 
						|
 | 
						|
WORKDIR /usr/src/app
 | 
						|
 | 
						|
COPY . .
 | 
						|
 | 
						|
CMD ["gunicorn", "src.main:server"]
 |