zyxciss commited on
Commit
ce5dee2
·
verified ·
1 Parent(s): 244b9a4

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -9
Dockerfile CHANGED
@@ -1,14 +1,19 @@
 
1
  FROM ghcr.io/remsky/kokoro-fastapi-cpu:v0.2.0post3
2
 
3
- # Set working directory to the project root (adjust if needed)
4
- WORKDIR /app
 
5
 
6
- # Optionally set PYTHONPATH so that /app is in the module search path
7
- ENV PYTHONPATH=/app
8
-
9
- # Use the port provided by Hugging Face Spaces (or default to 8880)
10
  ENV PORT=8880
11
- EXPOSE 8880
12
 
13
- # Run Uvicorn with the fully-qualified module name
14
- CMD ["sh", "-c", "uvicorn api.src.main:app --host 0.0.0.0 --port $PORT"]
 
 
 
 
 
 
 
 
1
+ # Use the prebuilt image as the base
2
  FROM ghcr.io/remsky/kokoro-fastapi-cpu:v0.2.0post3
3
 
4
+ # Install socat (if not already available)
5
+ # For Debian/Ubuntu–based images:
6
+ RUN apt-get update && apt-get install -y socat && rm -rf /var/lib/apt/lists/*
7
 
8
+ # Set a default PORT in case Spaces doesn’t inject one (Spaces usually will)
 
 
 
9
  ENV PORT=8880
 
10
 
11
+ # Expose the port that Spaces will use
12
+ EXPOSE ${PORT}
13
+
14
+ # Copy in a startup script
15
+ COPY start.sh /start.sh
16
+ RUN chmod +x /start.sh
17
+
18
+ # Use our startup script as the container’s command
19
+ CMD ["/start.sh"]