riu-rd commited on
Commit
7e890d0
·
verified ·
1 Parent(s): 49c7c0a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -2
Dockerfile CHANGED
@@ -6,8 +6,12 @@ COPY requirements.txt ./
6
 
7
  RUN pip install --no-cache-dir -r /requirements.txt
8
 
9
- RUN useradd -m -u 1000 useradd
 
10
 
 
 
 
11
  USER user
12
 
13
  ENV HOME=/home/user \
@@ -17,4 +21,4 @@ WORKDIR $HOME/app
17
 
18
  COPY --chown=user . $HOME/app/
19
 
20
- CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "7860"]
 
6
 
7
  RUN pip install --no-cache-dir -r /requirements.txt
8
 
9
+ # Add user with appropriate permissions
10
+ RUN useradd -m -u 1000 user
11
 
12
+ # Grant access to all files
13
+ USER root
14
+ RUN chmod -R 777 /home/user && chmod -R 777 /home/user/app
15
  USER user
16
 
17
  ENV HOME=/home/user \
 
21
 
22
  COPY --chown=user . $HOME/app/
23
 
24
+ CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "7860"]