Spaces:
Paused
Paused
Jirat Jaturanpinyo
commited on
Update Dockerfile
Browse files- Dockerfile +5 -2
Dockerfile
CHANGED
|
@@ -14,11 +14,14 @@ USER user
|
|
| 14 |
# Create the app directory
|
| 15 |
WORKDIR $HOME/app
|
| 16 |
|
| 17 |
-
# Copy the
|
| 18 |
-
COPY --chown=user . $HOME/app
|
| 19 |
|
| 20 |
# Install requirements.txt
|
| 21 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 22 |
|
|
|
|
|
|
|
|
|
|
| 23 |
# Start the FastAPI app on port 7860, the default port expected by Spaces
|
| 24 |
CMD ["python", "run.py", "--voicevox_dir", "../linux-cpu", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 14 |
# Create the app directory
|
| 15 |
WORKDIR $HOME/app
|
| 16 |
|
| 17 |
+
# Copy the requirements.txt file first to leverage Docker cache
|
| 18 |
+
COPY --chown=user requirements.txt $HOME/app/
|
| 19 |
|
| 20 |
# Install requirements.txt
|
| 21 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 22 |
|
| 23 |
+
# Copy the rest of the application code
|
| 24 |
+
COPY --chown=user . $HOME/app
|
| 25 |
+
|
| 26 |
# Start the FastAPI app on port 7860, the default port expected by Spaces
|
| 27 |
CMD ["python", "run.py", "--voicevox_dir", "../linux-cpu", "--host", "0.0.0.0", "--port", "7860"]
|