Upload 3 files
Browse files- dockerfile +20 -15
- requirements.txt +1 -0
dockerfile
CHANGED
|
@@ -1,31 +1,36 @@
|
|
| 1 |
-
# Use
|
| 2 |
FROM python:3.10-slim
|
| 3 |
|
| 4 |
-
# Set the working directory
|
| 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
|
| 13 |
-
COPY requirements.txt .
|
| 14 |
|
| 15 |
# Install Python dependencies
|
| 16 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
| 17 |
|
| 18 |
-
#
|
| 19 |
RUN python -m spacy download en_core_web_sm
|
| 20 |
|
| 21 |
-
#
|
| 22 |
-
|
| 23 |
|
| 24 |
-
#
|
| 25 |
-
COPY . .
|
| 26 |
-
|
| 27 |
-
# Expose the port Streamlit runs on
|
| 28 |
EXPOSE 8501
|
| 29 |
|
| 30 |
-
#
|
| 31 |
CMD ["streamlit", "run", "app.py"]
|
|
|
|
| 1 |
+
# Use a base image with Python 3.10
|
| 2 |
FROM python:3.10-slim
|
| 3 |
|
| 4 |
+
# Set the working directory
|
| 5 |
+
WORKDIR /home/user/app
|
| 6 |
|
| 7 |
# Install system dependencies
|
| 8 |
RUN apt-get update && apt-get install -y \
|
| 9 |
+
git \
|
| 10 |
+
git-lfs \
|
| 11 |
+
ffmpeg \
|
| 12 |
+
libsm6 \
|
| 13 |
+
libxext6 \
|
| 14 |
+
cmake \
|
| 15 |
+
rsync \
|
| 16 |
libgl1-mesa-glx \
|
| 17 |
+
&& rm -rf /var/lib/apt/lists/* \
|
| 18 |
+
&& git lfs install
|
| 19 |
|
| 20 |
+
# Copy the requirements file
|
| 21 |
+
COPY requirements.txt /tmp/requirements.txt
|
| 22 |
|
| 23 |
# Install Python dependencies
|
| 24 |
+
RUN pip install --no-cache-dir -r /tmp/requirements.txt
|
| 25 |
|
| 26 |
+
# Install the SpaCy model
|
| 27 |
RUN python -m spacy download en_core_web_sm
|
| 28 |
|
| 29 |
+
# Copy the rest of the application code
|
| 30 |
+
COPY . /home/user/app
|
| 31 |
|
| 32 |
+
# Expose the port Streamlit is running on
|
|
|
|
|
|
|
|
|
|
| 33 |
EXPOSE 8501
|
| 34 |
|
| 35 |
+
# Run the Streamlit application
|
| 36 |
CMD ["streamlit", "run", "app.py"]
|
requirements.txt
CHANGED
|
@@ -5,3 +5,4 @@ tensorflow
|
|
| 5 |
spacy==3.5.0
|
| 6 |
# SpaCy model
|
| 7 |
https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.5.0/en_core_web_sm-3.5.0.tar.gz
|
|
|
|
|
|
| 5 |
spacy==3.5.0
|
| 6 |
# SpaCy model
|
| 7 |
https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.5.0/en_core_web_sm-3.5.0.tar.gz
|
| 8 |
+
pydantic==1.10.11
|