Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +19 -10
Dockerfile
CHANGED
@@ -1,18 +1,27 @@
|
|
1 |
FROM python:3.10-slim
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
WORKDIR /app
|
4 |
-
COPY . .
|
5 |
|
|
|
|
|
6 |
|
7 |
-
#
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
|
|
|
|
|
|
|
|
12 |
|
13 |
-
|
14 |
-
RUN git clone https://github.com/myshell-ai/OpenVoice
|
15 |
RUN pip install --no-cache-dir -r requirements.txt
|
16 |
-
EXPOSE 7860
|
17 |
ENV GRADIO_SERVER_NAME="0.0.0.0"
|
18 |
CMD ["python", "melotts_training.py"]
|
|
|
1 |
FROM python:3.10-slim
|
2 |
+
# Install Git
|
3 |
+
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
|
4 |
+
|
5 |
+
# Create non-root user
|
6 |
+
RUN useradd -m -u 1000 user
|
7 |
+
|
8 |
+
# Set working directory
|
9 |
WORKDIR /app
|
|
|
10 |
|
11 |
+
# Set permissions for /app to be writable by the non-root user
|
12 |
+
RUN chown -R 1000:1000 /app && chmod -R 775 /app
|
13 |
|
14 |
+
# Switch to non-root user for cloning and subsequent commands
|
15 |
+
USER 1000
|
16 |
+
|
17 |
+
# Clone the repositories
|
18 |
+
RUN git clone https://github.com/myshell-ai/MeloTTS /app/MeloTTS && \
|
19 |
+
git clone https://github.com/myshell-ai/OpenVoice /app/OpenVoice
|
20 |
+
|
21 |
+
# Copy application files
|
22 |
+
COPY --chown=1000:1000 . /app
|
23 |
|
24 |
+
# Install Python dependencies (if any)
|
|
|
25 |
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
26 |
ENV GRADIO_SERVER_NAME="0.0.0.0"
|
27 |
CMD ["python", "melotts_training.py"]
|