JhonSmith0x7b commited on
Commit
c122f91
·
1 Parent(s): 9ad87ac
Files changed (1) hide show
  1. Dockerfile +6 -8
Dockerfile CHANGED
@@ -2,19 +2,17 @@ FROM python:3.8-bullseye
2
 
3
  COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
4
 
5
- WORKDIR /app
6
-
7
- # Set the working directory
8
- ADD . /app
9
 
 
10
  RUN cd /tmp && wget -qq https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/espeak-ng-data.tar.bz2 && tar xf espeak-ng-data.tar.bz2
11
-
12
  RUN rm -f /app/.env
13
  # Copy the requirements file and install dependencies
14
 
15
- RUN uv lock
16
- RUN uv sync
17
-
18
  ENV PATH="/app/.venv/bin:$PATH"
19
 
20
  # Set the default command to run the application
 
2
 
3
  COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
4
 
5
+ USER user
6
+ ENV HOME=/home/user \
7
+ PATH=/home/user/.local/bin:$PATH
8
+ WORKDIR $HOME/app
9
 
10
+ COPY --chown=user . $HOME/app
11
  RUN cd /tmp && wget -qq https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/espeak-ng-data.tar.bz2 && tar xf espeak-ng-data.tar.bz2
 
12
  RUN rm -f /app/.env
13
  # Copy the requirements file and install dependencies
14
 
15
+ RUN uv lock && uv sync
 
 
16
  ENV PATH="/app/.venv/bin:$PATH"
17
 
18
  # Set the default command to run the application