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