Spaces:
Build error
Build error
Create Docker
Browse files
Docker
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use an official Python runtime as a parent image
|
2 |
+
FROM python:3.10-slim
|
3 |
+
|
4 |
+
# Set the working directory in the container
|
5 |
+
WORKDIR /app
|
6 |
+
|
7 |
+
# Install system dependencies
|
8 |
+
RUN apt-get update && apt-get install -y \
|
9 |
+
poppler-utils \
|
10 |
+
tesseract-ocr \
|
11 |
+
ffmpeg \
|
12 |
+
curl \
|
13 |
+
&& rm -rf /var/lib/apt/lists/*
|
14 |
+
|
15 |
+
# Install Node.js
|
16 |
+
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
|
17 |
+
&& apt-get install -y nodejs \
|
18 |
+
&& rm -rf /var/lib/apt/lists/*
|
19 |
+
|
20 |
+
# Upgrade pip
|
21 |
+
RUN pip install --no-cache-dir --upgrade pip
|
22 |
+
|
23 |
+
# Copy the requirements file into the container
|
24 |
+
COPY requirements.txt .
|
25 |
+
|
26 |
+
# Install any needed packages specified in requirements.txt
|
27 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
28 |
+
|
29 |
+
# Copy the rest of your application's code
|
30 |
+
COPY . .
|
31 |
+
|
32 |
+
# Make port 7860 available to the world outside this container
|
33 |
+
EXPOSE 7860
|
34 |
+
|
35 |
+
# Define environment variable for Gradio
|
36 |
+
ENV GRADIO_SERVER_NAME=0.0.0.0
|
37 |
+
|
38 |
+
# Run app.py when the container launches
|
39 |
+
CMD ["python", "app.py"]
|