37 lines
		
	
	
		
			833 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
		
			833 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
FROM ubuntu:22.04 AS builder
 | 
						|
 | 
						|
 | 
						|
RUN apt-get update -yq \
 | 
						|
  && apt-get install -yq --no-install-recommends \
 | 
						|
  curl build-essential rust-all python3-pip python3-dev
 | 
						|
 | 
						|
COPY requirements.txt .
 | 
						|
 | 
						|
RUN pip install --upgrade pip && \
 | 
						|
  pip install --user --no-cache-dir -U setuptools && \
 | 
						|
  pip install --user --no-cache-dir -r requirements.txt
 | 
						|
 | 
						|
FROM ubuntu:22.04
 | 
						|
LABEL version="1.0.0"
 | 
						|
MAINTAINER "Reza Behzadan <rbehzadan@gmail.com>"
 | 
						|
ARG DEBIAN_FRONTEND=noninteractive
 | 
						|
ENV TZ="Asia/Tehran"
 | 
						|
 | 
						|
COPY --from=builder /root/.local /root/.local
 | 
						|
 | 
						|
RUN apt-get update -yq \
 | 
						|
 && apt-get install -yq --no-install-recommends \
 | 
						|
 python3 \
 | 
						|
 && apt-get autoremove \
 | 
						|
 && apt-get clean \
 | 
						|
 && rm -rf /var/lib/apt/lists/*
 | 
						|
 | 
						|
COPY model /model
 | 
						|
WORKDIR /app
 | 
						|
COPY main.py .
 | 
						|
COPY .env.docker .env
 | 
						|
 | 
						|
# ENV PATH=/root/.local/bin:$PATH
 | 
						|
 | 
						|
ENTRYPOINT [ "python3", "main.py" ]
 |