|  | FROM python:3.11-slim | 
					
						
						|  |  | 
					
						
						|  | ENV PYTHONDONTWRITEBYTECODE=1 \ | 
					
						
						|  | PYTHONUNBUFFERED=1 \ | 
					
						
						|  | NLTK_DATA=/usr/local/nltk_data | 
					
						
						|  |  | 
					
						
						|  | WORKDIR /app | 
					
						
						|  |  | 
					
						
						|  |  | 
					
						
						|  | RUN apt-get update && apt-get install -y --no-install-recommends \ | 
					
						
						|  | build-essential \ | 
					
						
						|  | git \ | 
					
						
						|  | python3-dev \ | 
					
						
						|  | libffi-dev \ | 
					
						
						|  | libssl-dev \ | 
					
						
						|  | rustc \ | 
					
						
						|  | cargo \ | 
					
						
						|  | && rm -rf /var/lib/apt/lists/* | 
					
						
						|  |  | 
					
						
						|  |  | 
					
						
						|  | RUN python -m pip install --upgrade pip setuptools wheel | 
					
						
						|  |  | 
					
						
						|  |  | 
					
						
						|  | RUN pip install --no-cache-dir nltk | 
					
						
						|  |  | 
					
						
						|  |  | 
					
						
						|  | RUN python -m nltk.downloader -d /usr/local/nltk_data punkt averaged_perceptron_tagger averaged_perceptron_tagger_eng | 
					
						
						|  |  | 
					
						
						|  |  | 
					
						
						|  | COPY requirements.txt /app/requirements.txt | 
					
						
						|  | RUN pip install --no-cache-dir -r /app/requirements.txt | 
					
						
						|  |  | 
					
						
						|  |  | 
					
						
						|  | COPY . /app | 
					
						
						|  |  | 
					
						
						|  | EXPOSE 7860 | 
					
						
						|  |  | 
					
						
						|  | CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] |