Qa5im commited on
Commit
4de9606
·
1 Parent(s): 991bab5

docker updated

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -3
Dockerfile CHANGED
@@ -19,15 +19,27 @@ FROM python:3.10.12
19
  # Copy the current directory contents into the container at .
20
  COPY . .
21
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  # Set the working directory to /
23
  WORKDIR /
24
 
25
  RUN mkdir -p /uploads
26
  RUN chmod 777 /uploads
27
 
28
- # Install requirements.txt
29
- RUN pip install ffmpeg
30
- RUN pip install --no-cache-dir --upgrade -r /requirements.txt
31
 
32
  # Start the FastAPI app on port 7860, the default port expected by Spaces
33
  CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]
 
19
  # Copy the current directory contents into the container at .
20
  COPY . .
21
 
22
+ # Install requirements.txt
23
+ RUN pip install ffmpeg -U
24
+ RUN pip install --no-cache-dir --upgrade -r /requirements.txt
25
+
26
+
27
+ RUN useradd -m -u 1000 user
28
+
29
+ USER user
30
+
31
+ ENV HOME=/home/user \
32
+ PATH=/home/user/.local/bin:$PATH
33
+
34
  # Set the working directory to /
35
  WORKDIR /
36
 
37
  RUN mkdir -p /uploads
38
  RUN chmod 777 /uploads
39
 
40
+
41
+ COPY --chown=user . /
42
+
43
 
44
  # Start the FastAPI app on port 7860, the default port expected by Spaces
45
  CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]