bla commited on
Commit
6c09cd7
·
verified ·
1 Parent(s): 276abba

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -8
Dockerfile CHANGED
@@ -14,6 +14,8 @@ RUN apt-get update && apt-get install -y \
14
  && mkdir -p /usr/share/espeak-ng-data \
15
  && ln -s /usr/lib/*/espeak-ng-data/* /usr/share/espeak-ng-data/
16
 
 
 
17
  # Install UV using the installer script
18
  RUN curl -LsSf https://astral.sh/uv/install.sh | sh && \
19
  mv /root/.local/bin/uv /usr/local/bin/ && \
@@ -26,8 +28,8 @@ RUN useradd -m -u 1000 appuser && \
26
 
27
  USER appuser
28
  WORKDIR /app
29
- git clone https://github.com/remsky/Kokoro-FastAPI.git
30
- cd Kokoro-FastAPI
31
 
32
  # Copy dependency files
33
  COPY --chown=appuser:appuser pyproject.toml ./pyproject.toml
@@ -37,11 +39,8 @@ RUN --mount=type=cache,target=/root/.cache/uv \
37
  uv venv --python 3.10 && \
38
  uv sync --extra cpu
39
 
40
- # Copy project files including models
41
- COPY --chown=appuser:appuser api ./api
42
- COPY --chown=appuser:appuser web ./web
43
- COPY --chown=appuser:appuser docker/scripts/ ./
44
- RUN chmod +x ./entrypoint.sh
45
 
46
  # Set environment variables
47
  ENV PYTHONUNBUFFERED=1 \
@@ -61,5 +60,5 @@ RUN if [ "$DOWNLOAD_MODEL" = "true" ]; then \
61
 
62
  ENV DEVICE="cpu"
63
  # Run FastAPI server through entrypoint.sh
64
- CMD ["/app/Kokoro-FastAPI/start-cpu.sh"]
65
 
 
14
  && mkdir -p /usr/share/espeak-ng-data \
15
  && ln -s /usr/lib/*/espeak-ng-data/* /usr/share/espeak-ng-data/
16
 
17
+ RUN git clone https://github.com/remsky/Kokoro-FastAPI.git .
18
+
19
  # Install UV using the installer script
20
  RUN curl -LsSf https://astral.sh/uv/install.sh | sh && \
21
  mv /root/.local/bin/uv /usr/local/bin/ && \
 
28
 
29
  USER appuser
30
  WORKDIR /app
31
+
32
+ # RUN cd Kokoro-FastAPI
33
 
34
  # Copy dependency files
35
  COPY --chown=appuser:appuser pyproject.toml ./pyproject.toml
 
39
  uv venv --python 3.10 && \
40
  uv sync --extra cpu
41
 
42
+
43
+
 
 
 
44
 
45
  # Set environment variables
46
  ENV PYTHONUNBUFFERED=1 \
 
60
 
61
  ENV DEVICE="cpu"
62
  # Run FastAPI server through entrypoint.sh
63
+ CMD ["bash /app/start-cpu.sh"]
64