Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +7 -14
Dockerfile
CHANGED
@@ -1,26 +1,19 @@
|
|
1 |
FROM python:3.9-slim
|
2 |
|
3 |
-
# Install system dependencies
|
4 |
RUN apt-get update && apt-get install -y \
|
5 |
ffmpeg \
|
6 |
-
|
7 |
-
|
8 |
-
libxext6 \ # For image rendering
|
9 |
-
poppler-utils \ # For PDF processing
|
10 |
-
tesseract-ocr \ # Optional: For OCR in images
|
11 |
-
libgl1 \ # Required for OpenCV
|
12 |
&& rm -rf /var/lib/apt/lists/*
|
13 |
|
14 |
-
# Install Python packages with cache optimization
|
15 |
WORKDIR /app
|
16 |
-
COPY requirements.txt .
|
17 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
18 |
|
19 |
-
# Copy
|
20 |
COPY . .
|
21 |
|
22 |
-
#
|
23 |
-
|
24 |
-
HF_HUB_DISABLE_TELEMETRY=1
|
25 |
|
|
|
26 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
1 |
FROM python:3.9-slim
|
2 |
|
3 |
+
# Install system dependencies
|
4 |
RUN apt-get update && apt-get install -y \
|
5 |
ffmpeg \
|
6 |
+
libsm6 \
|
7 |
+
libxext6 \
|
|
|
|
|
|
|
|
|
8 |
&& rm -rf /var/lib/apt/lists/*
|
9 |
|
|
|
10 |
WORKDIR /app
|
|
|
|
|
11 |
|
12 |
+
# Copy files into container
|
13 |
COPY . .
|
14 |
|
15 |
+
# Make install script executable and run it
|
16 |
+
RUN chmod +x install.sh && ./install.sh
|
|
|
17 |
|
18 |
+
# Run app with Uvicorn
|
19 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|