-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
45 lines (33 loc) · 1.2 KB
/
Dockerfile
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
35
36
37
38
39
40
41
42
43
44
45
# Use Python 3.8 base image
FROM python:3.12
# Install system dependencies (for spaCy and its dependencies)
RUN apt-get update && apt-get install -y \
build-essential \
python3-dev \
libatlas-base-dev \
gfortran \
curl \
git \
wget
# Upgrade pip, setuptools, and wheel (to ensure we're using the latest version)
RUN pip install --upgrade pip setuptools wheel
# Install spaCy (make sure the compatible version with Python 3.8 is installed)
RUN pip3 install spacy==3.7.5 # Change this to a specific compatible version, e.g. 2.2.4
# Download the necessary spaCy language model (en_core_web_sm)
RUN python -m spacy download en_core_web_sm
# Install required Python dependencies
RUN pip3 install tqdm
RUN pip3 install Cython
RUN pip install xaif_eval==0.0.9
RUN pip3 install markdown2
RUN pip3 install flask-cors
# Copy the application files into the container
COPY . /app
# Set the working directory to /app
WORKDIR /app
# Install additional Python dependencies from requirements.txt
RUN pip install -r requirements.txt
# Expose port 5008 for the Flask app
EXPOSE 5005
# Set the default command to run the application
CMD ["python", "./main.py"]