Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +28 -23
Dockerfile
CHANGED
@@ -1,24 +1,29 @@
|
|
1 |
-
FROM python:3.9-slim
|
2 |
-
|
3 |
-
WORKDIR /app
|
4 |
-
|
5 |
-
# Install system dependencies
|
6 |
-
RUN apt-get update && apt-get install -y \
|
7 |
-
build-essential \
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
|
|
|
|
|
|
|
|
|
|
24 |
CMD ["streamlit", "run", "app.py", "--server.address", "0.0.0.0"]
|
|
|
1 |
+
FROM python:3.9-slim
|
2 |
+
|
3 |
+
WORKDIR /app
|
4 |
+
|
5 |
+
# Install system dependencies
|
6 |
+
RUN apt-get update && apt-get install -y \
|
7 |
+
build-essential \
|
8 |
+
libffi-dev \
|
9 |
+
python3-dev \
|
10 |
+
&& rm -rf /var/lib/apt/lists/*
|
11 |
+
|
12 |
+
# Copy requirements first to leverage Docker cache
|
13 |
+
COPY requirements.txt .
|
14 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
15 |
+
|
16 |
+
# Copy the rest of the application
|
17 |
+
COPY . .
|
18 |
+
|
19 |
+
# Create necessary directories
|
20 |
+
RUN mkdir -p audio_output sentiment_history
|
21 |
+
|
22 |
+
# Download NLTK data
|
23 |
+
RUN python -c "import nltk; nltk.download('punkt'); nltk.download('averaged_perceptron_tagger')"
|
24 |
+
|
25 |
+
# Expose the port Streamlit will run on
|
26 |
+
EXPOSE 8501
|
27 |
+
|
28 |
+
# Command to run the application
|
29 |
CMD ["streamlit", "run", "app.py", "--server.address", "0.0.0.0"]
|