Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +1 -34
Dockerfile
CHANGED
|
@@ -4,40 +4,7 @@
|
|
| 4 |
# Build with the command:
|
| 5 |
# docker build --platform linux/amd64 -t ebook2audiobook .
|
| 6 |
|
| 7 |
-
FROM
|
| 8 |
-
|
| 9 |
-
# Create and switch to a non-root user
|
| 10 |
-
RUN useradd -m -u 1000 user
|
| 11 |
-
USER user
|
| 12 |
-
ENV PATH="/home/user/.local/bin:$PATH"
|
| 13 |
-
|
| 14 |
-
# Set a working directory for temporary operations
|
| 15 |
-
WORKDIR /app
|
| 16 |
-
|
| 17 |
-
# Install system packages
|
| 18 |
-
USER root
|
| 19 |
-
RUN apt-get update && \
|
| 20 |
-
apt-get install -y wget git calibre ffmpeg libmecab-dev mecab mecab-ipadic && \
|
| 21 |
-
apt-get clean && \
|
| 22 |
-
rm -rf /var/lib/apt/lists/*
|
| 23 |
-
|
| 24 |
-
# Clone the GitHub repository and set it as the working directory
|
| 25 |
-
USER root
|
| 26 |
-
RUN apt-get update && apt-get install -y git && apt-get clean && rm -rf /var/lib/apt/lists/*
|
| 27 |
-
USER user
|
| 28 |
-
RUN git clone https://github.com/ROBERT-MCDOWELL/ebook2audiobook.git /home/user/app
|
| 29 |
-
|
| 30 |
-
# Set the cloned repository as the base working directory
|
| 31 |
-
WORKDIR /home/user/app
|
| 32 |
-
|
| 33 |
-
#Install Python dependences from the ebook2audiobook repo
|
| 34 |
-
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 35 |
-
|
| 36 |
-
# Do a test run to make sure that the base models are pre-downloaded and baked into the image
|
| 37 |
-
#RUN echo "This is a test sentence." > test.txt
|
| 38 |
-
#RUN python app.py --headless --ebook test.txt
|
| 39 |
-
#RUN rm test.txt
|
| 40 |
-
|
| 41 |
# Expose the required port
|
| 42 |
EXPOSE 7860
|
| 43 |
|
|
|
|
| 4 |
# Build with the command:
|
| 5 |
# docker build --platform linux/amd64 -t ebook2audiobook .
|
| 6 |
|
| 7 |
+
FROM athomasson2/ebook2audiobook:dev_2.1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
# Expose the required port
|
| 9 |
EXPOSE 7860
|
| 10 |
|