File size: 841 Bytes
d266ceb
 
11f2140
d266ceb
9c7dff6
d266ceb
81ed403
d266ceb
 
 
 
11f2140
da551e8
11f2140
 
 
 
d266ceb
 
11f2140
d266ceb
da551e8
 
d266ceb
7989fea
 
d266ceb
a6c9d23
 
d266ceb
 
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
# Use an official Python image
FROM nvidia/cuda:11.8.0-base-ubuntu22.04

# Set up Python environment
ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHONUNBUFFERED=1

# Install system packages
RUN apt-get update && apt-get install -y \
    wget git calibre ffmpeg libmecab-dev mecab mecab-ipadic python3-pip \
    && apt-get clean && rm -rf /var/lib/apt/lists/*

# Create and switch to a non-root user
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"

# Set working directory
WORKDIR /home/user/ebook2audiobook

# Clone the GitHub repository
RUN git clone https://github.com/DrewThomasson/ebook2audiobook.git /home/user/ebook2audiobook

# Install Python dependencies
RUN pip install --no-cache-dir --upgrade -r requirements.txt

# Expose the application port
EXPOSE 7860

# Start the Gradio app
CMD ["python", "app.py"]