Update Dockerfile
Browse files- Dockerfile +25 -12
Dockerfile
CHANGED
|
@@ -1,24 +1,37 @@
|
|
| 1 |
-
#
|
| 2 |
FROM python:3.8-slim
|
| 3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
# Set the working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
# Install dependencies
|
| 8 |
-
RUN
|
| 9 |
-
|
|
|
|
| 10 |
|
| 11 |
-
# Clone the repository
|
| 12 |
RUN git clone https://github.com/neonbjb/tortoise-tts.git
|
| 13 |
|
| 14 |
-
#
|
| 15 |
WORKDIR /app/tortoise-tts
|
| 16 |
|
| 17 |
-
# Install requirements
|
| 18 |
-
RUN pip install -r requirements.txt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
-
#
|
| 21 |
-
|
| 22 |
|
| 23 |
-
# Command to run your script
|
| 24 |
-
CMD ["python", "your_script.py"]
|
|
|
|
| 1 |
+
# Use a base image with Python
|
| 2 |
FROM python:3.8-slim
|
| 3 |
|
| 4 |
+
# Set environment variables to avoid prompts during installation
|
| 5 |
+
ENV PYTHONUNBUFFERED 1
|
| 6 |
+
ENV PIP_NO_CACHE_DIR=off
|
| 7 |
+
ENV PIP_DISABLE_PIP_VERSION_CHECK=on
|
| 8 |
+
|
| 9 |
# Set the working directory
|
| 10 |
WORKDIR /app
|
| 11 |
|
| 12 |
+
# Install system dependencies and Python packages
|
| 13 |
+
RUN apt-get update && \
|
| 14 |
+
apt-get install -y git && \
|
| 15 |
+
pip install --no-cache-dir -U scipy gradio
|
| 16 |
|
| 17 |
+
# Clone the Tortoise-TTS repository
|
| 18 |
RUN git clone https://github.com/neonbjb/tortoise-tts.git
|
| 19 |
|
| 20 |
+
# Set the working directory to the cloned repository
|
| 21 |
WORKDIR /app/tortoise-tts
|
| 22 |
|
| 23 |
+
# Install the required Python packages from requirements.txt
|
| 24 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 25 |
+
|
| 26 |
+
# Install the package using setup.py
|
| 27 |
+
RUN python setup.py install
|
| 28 |
+
|
| 29 |
+
# Copy your application code (e.g., app.py) to the container
|
| 30 |
+
COPY app.py .
|
| 31 |
+
|
| 32 |
+
# Expose the port that Gradio will run on
|
| 33 |
+
EXPOSE 7860
|
| 34 |
|
| 35 |
+
# Command to run your application
|
| 36 |
+
CMD ["python", "app.py"]
|
| 37 |
|
|
|
|
|
|