File size: 559 Bytes
135aa7a
 
 
 
 
 
3c7831f
64e35cf
b6910a5
 
64e35cf
135aa7a
 
 
 
 
 
 
64e35cf
135aa7a
 
105b4a8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM python:3.12
LABEL authors="dang-minh"

# Set the working directory in the container
WORKDIR /src

COPY web /src/web

COPY spam_classifier_model.pkl /src/spam_classifier_model.pkl 
COPY tfidf_vectorizer.pkl /src/tfidf_vectorizer.pkl 

COPY server.py /src/server.py
COPY requirements.txt /src/requirements.txt

# Install the required dependencies
RUN pip install --no-cache-dir -r requirements.txt

# Expose the port that FastAPI will run on
EXPOSE 7860

# Run FastAPI app using uvicorn
CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]