mednow commited on
Commit
1f1d598
·
verified ·
1 Parent(s): 036adc0

Upload dockerfile

Browse files
Files changed (1) hide show
  1. dockerfile +28 -0
dockerfile ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official Python runtime as a parent image
2
+ FROM python:3.10-slim
3
+
4
+ # Set the working directory in the container
5
+ WORKDIR /app
6
+
7
+ # Install system dependencies
8
+ RUN apt-get update && apt-get install -y \
9
+ libgl1-mesa-glx \
10
+ && rm -rf /var/lib/apt/lists/*
11
+
12
+ # Copy the requirements file into the container
13
+ COPY requirements.txt .
14
+
15
+ # Install Python dependencies
16
+ RUN pip install --no-cache-dir -r requirements.txt
17
+
18
+ # Copy the rest of the application code into the container
19
+ COPY . .
20
+
21
+ # Download and link the Spacy model inside the container
22
+ RUN python -m spacy download en_core_web_sm
23
+
24
+ # Expose the port Streamlit runs on
25
+ EXPOSE 8501
26
+
27
+ # Command to run the application
28
+ CMD ["streamlit", "run", "app.py"]