Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +6 -6
Dockerfile
CHANGED
|
@@ -1,4 +1,3 @@
|
|
| 1 |
-
# Use Python base image
|
| 2 |
FROM python:3.9-slim
|
| 3 |
|
| 4 |
# Install system dependencies
|
|
@@ -6,20 +5,21 @@ RUN apt-get update && apt-get install -y \
|
|
| 6 |
libgl1 \
|
| 7 |
libglib2.0-0 \
|
| 8 |
ffmpeg \
|
|
|
|
| 9 |
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
|
| 11 |
-
# Set
|
| 12 |
WORKDIR /app
|
| 13 |
|
| 14 |
-
# Copy
|
| 15 |
-
COPY .
|
| 16 |
|
| 17 |
# Install Python dependencies
|
| 18 |
RUN pip install --upgrade pip
|
| 19 |
RUN pip install -r requirements.txt
|
| 20 |
|
| 21 |
-
# Expose
|
| 22 |
EXPOSE 7860
|
| 23 |
|
| 24 |
-
# Run FastAPI app
|
| 25 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
|
|
|
| 1 |
FROM python:3.9-slim
|
| 2 |
|
| 3 |
# Install system dependencies
|
|
|
|
| 5 |
libgl1 \
|
| 6 |
libglib2.0-0 \
|
| 7 |
ffmpeg \
|
| 8 |
+
tesseract-ocr \
|
| 9 |
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
|
| 11 |
+
# Set working directory
|
| 12 |
WORKDIR /app
|
| 13 |
|
| 14 |
+
# Copy project files
|
| 15 |
+
COPY . .
|
| 16 |
|
| 17 |
# Install Python dependencies
|
| 18 |
RUN pip install --upgrade pip
|
| 19 |
RUN pip install -r requirements.txt
|
| 20 |
|
| 21 |
+
# Expose Hugging Face Spaces default port
|
| 22 |
EXPOSE 7860
|
| 23 |
|
| 24 |
+
# Run FastAPI app with Uvicorn
|
| 25 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|