Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +3 -38
Dockerfile
CHANGED
|
@@ -1,40 +1,5 @@
|
|
| 1 |
-
#
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
FROM python:3.12
|
| 5 |
-
|
| 6 |
-
# Create and switch to a non-root user
|
| 7 |
-
RUN useradd -m -u 1000 user
|
| 8 |
-
USER user
|
| 9 |
-
ENV PATH="/home/user/.local/bin:$PATH"
|
| 10 |
-
|
| 11 |
-
# Set a working directory for temporary operations
|
| 12 |
-
WORKDIR /app
|
| 13 |
-
|
| 14 |
-
# Install system packages
|
| 15 |
-
USER root
|
| 16 |
-
RUN apt-get update && \
|
| 17 |
-
apt-get install -y wget git calibre ffmpeg libmecab-dev mecab mecab-ipadic && \
|
| 18 |
-
apt-get clean && \
|
| 19 |
-
rm -rf /var/lib/apt/lists/*
|
| 20 |
-
|
| 21 |
-
# Clone the GitHub repository and set it as the working directory
|
| 22 |
-
USER root
|
| 23 |
-
RUN apt-get update && apt-get install -y git && apt-get clean && rm -rf /var/lib/apt/lists/*
|
| 24 |
-
USER user
|
| 25 |
-
RUN git clone https://github.com/DrewThomasson/ebook2audiobook.git /home/user/ebook2audiobook
|
| 26 |
-
|
| 27 |
-
# Set the cloned repository as the base working directory
|
| 28 |
-
WORKDIR /home/user/ebook2audiobook
|
| 29 |
-
|
| 30 |
-
# Swap to the demo branch
|
| 31 |
-
RUN git checkout demo
|
| 32 |
-
|
| 33 |
-
#Install Python dependences from the ebook2audiobook repo
|
| 34 |
-
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 35 |
|
| 36 |
# Expose the required port
|
| 37 |
-
EXPOSE 7860
|
| 38 |
-
|
| 39 |
-
# Start the Gradio app from the repository
|
| 40 |
-
CMD ["python", "app.py"]
|
|
|
|
| 1 |
+
#dockerfile used to build can be found at https://github.com/DrewThomasson/ebook2audiobook/blob/main/dockerfiles/HuggingfaceDockerfile
|
| 2 |
+
FROM athomasson2/ebook2audiobook:HuggingfaceSpace
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
|
| 4 |
# Expose the required port
|
| 5 |
+
EXPOSE 7860
|
|
|
|
|
|
|
|
|