File size: 793 Bytes
8384a87
5809b1a
dfd2dd2
 
 
 
 
 
 
1c43883
5a56df6
 
f1ddf07
 
1c43883
a41b07f
 
 
 
dfd2dd2
b96f4cb
a41b07f
4417cb0
dfd2dd2
ec30fb1
5a56df6
dfd2dd2
4417cb0
a41b07f
d90270f
5809b1a
a41b07f
ec30fb1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
FROM python:3.9-slim

# Install necessary system dependencies
RUN apt-get update && apt-get install -y \
    gcc \
    build-essential \
    libffi-dev \
    libssl-dev \
    && rm -rf /var/lib/apt/lists/*

# Create a directory for NLTK data and set permissions
RUN mkdir -p /app/nltk_data && chown -R 1000:1000 /app/nltk_data
RUN mkdir -p /app/plots && chown -R 1000:1000 /app


# Set environment variable for NLTK data
ENV NLTK_DATA=/app/nltk_data

# Set the working directory
WORKDIR /app

# Copy requirements and install dependencies
COPY requirements.txt ./
RUN pip install --no-cache-dir --upgrade -r requirements.txt

# Copy application code
COPY . .

# Expose port
EXPOSE 7860

# Command to run the FastAPI application
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]