Update Dockerfile
Browse files- Dockerfile +23 -2
Dockerfile
CHANGED
@@ -4,18 +4,39 @@ FROM python:3.11-slim
|
|
4 |
ENV PYTHONUNBUFFERED=1
|
5 |
|
6 |
# Install system dependencies
|
7 |
-
RUN apt-get update && apt-get install -y
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
# Copy and install Python dependencies
|
10 |
COPY requirements.txt .
|
11 |
RUN pip install --no-cache-dir -r requirements.txt
|
12 |
|
|
|
|
|
|
|
13 |
# Install Playwright and Browsers
|
14 |
RUN pip install playwright && playwright install --with-deps chromium
|
15 |
|
16 |
# Copy app files
|
17 |
COPY . /app
|
18 |
WORKDIR /app
|
|
|
|
|
19 |
RUN chmod -R 755 /app
|
20 |
|
21 |
# Preload SentenceTransformer model to avoid runtime errors
|
@@ -25,4 +46,4 @@ RUN python -c "from sentence_transformers import SentenceTransformer; SentenceTr
|
|
25 |
EXPOSE 7860
|
26 |
|
27 |
# Run the app
|
28 |
-
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]
|
|
|
4 |
ENV PYTHONUNBUFFERED=1
|
5 |
|
6 |
# Install system dependencies
|
7 |
+
RUN apt-get update && apt-get install -y \
|
8 |
+
wget \
|
9 |
+
curl \
|
10 |
+
libnss3 \
|
11 |
+
libatk1.0-0 \
|
12 |
+
libatk-bridge2.0-0 \
|
13 |
+
libcups2 \
|
14 |
+
libxkbcommon0 \
|
15 |
+
libxcomposite1 \
|
16 |
+
libxrandr2 \
|
17 |
+
libasound2 \
|
18 |
+
libpangocairo-1.0-0 \
|
19 |
+
libxdamage1 \
|
20 |
+
libgbm1 \
|
21 |
+
libpango-1.0-0 \
|
22 |
+
libgtk-3-0 \
|
23 |
+
gcc
|
24 |
|
25 |
# Copy and install Python dependencies
|
26 |
COPY requirements.txt .
|
27 |
RUN pip install --no-cache-dir -r requirements.txt
|
28 |
|
29 |
+
# Install additional Hugging Face and related libraries
|
30 |
+
RUN pip install -U transformers accelerate peft huggingface_hub
|
31 |
+
|
32 |
# Install Playwright and Browsers
|
33 |
RUN pip install playwright && playwright install --with-deps chromium
|
34 |
|
35 |
# Copy app files
|
36 |
COPY . /app
|
37 |
WORKDIR /app
|
38 |
+
|
39 |
+
# Set appropriate permissions
|
40 |
RUN chmod -R 755 /app
|
41 |
|
42 |
# Preload SentenceTransformer model to avoid runtime errors
|
|
|
46 |
EXPOSE 7860
|
47 |
|
48 |
# Run the app
|
49 |
+
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]
|