Update Dockerfile
Browse files- Dockerfile +7 -9
Dockerfile
CHANGED
|
@@ -2,20 +2,18 @@ FROM ghcr.io/remsky/kokoro-fastapi-cpu:v0.2.0post3
|
|
| 2 |
|
| 3 |
# Switch to root so we can install packages
|
| 4 |
USER root
|
| 5 |
-
|
| 6 |
RUN apt-get update && apt-get install -y socat && rm -rf /var/lib/apt/lists/*
|
| 7 |
|
| 8 |
-
#
|
| 9 |
-
#
|
| 10 |
-
# USER appuser
|
| 11 |
-
|
| 12 |
-
# Set environment variables and expose the port
|
| 13 |
ENV PORT=8880
|
|
|
|
|
|
|
| 14 |
EXPOSE ${PORT}
|
| 15 |
|
| 16 |
-
# Copy
|
| 17 |
COPY start.sh /start.sh
|
| 18 |
RUN chmod +x /start.sh
|
| 19 |
|
| 20 |
-
#
|
| 21 |
-
|
|
|
|
| 2 |
|
| 3 |
# Switch to root so we can install packages
|
| 4 |
USER root
|
|
|
|
| 5 |
RUN apt-get update && apt-get install -y socat && rm -rf /var/lib/apt/lists/*
|
| 6 |
|
| 7 |
+
# Set the PORT environment variable.
|
| 8 |
+
# Hugging Face Spaces will provide a $PORT value; default to 8880 if not set.
|
|
|
|
|
|
|
|
|
|
| 9 |
ENV PORT=8880
|
| 10 |
+
|
| 11 |
+
# Expose the port (the value of $PORT)
|
| 12 |
EXPOSE ${PORT}
|
| 13 |
|
| 14 |
+
# Copy in our wrapper startup script
|
| 15 |
COPY start.sh /start.sh
|
| 16 |
RUN chmod +x /start.sh
|
| 17 |
|
| 18 |
+
# Override the base image’s entrypoint so only our script runs.
|
| 19 |
+
ENTRYPOINT ["/start.sh"]
|