18 lines
		
	
	
		
			464 B
		
	
	
	
		
			Docker
		
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			464 B
		
	
	
	
		
			Docker
		
	
	
	
FROM python:3.11-slim
 | 
						|
 | 
						|
RUN apt-get update && apt-get install -y --no-install-recommends \
 | 
						|
    build-essential \
 | 
						|
    libffi-dev \
 | 
						|
    libssl-dev \
 | 
						|
    && rm -rf /var/lib/apt/lists/*
 | 
						|
 | 
						|
COPY app /app
 | 
						|
 | 
						|
RUN pip install --upgrade pip
 | 
						|
RUN pip install -r app/requirements.txt
 | 
						|
RUN pip install torch --index-url https://download.pytorch.org/whl/cpu
 | 
						|
 | 
						|
EXPOSE 8002
 | 
						|
 | 
						|
CMD ["gunicorn", "--worker-class", "uvicorn.workers.UvicornWorker", "--bind", "0.0.0.0:8002", "--workers", "4"]
 |