Yash Sachdeva commited on
Commit
fafbe92
1 Parent(s): d3b2b82

dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -2
Dockerfile CHANGED
@@ -14,10 +14,20 @@ RUN pip install torch
14
 
15
  #Install pytorch ends
16
 
17
-
18
-
19
  # Install requirements.txt
20
  RUN pip install --no-cache-dir --upgrade -r /requirements.txt
21
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  # Start the FastAPI app on port 7860, the default port expected by Spaces
23
  CMD ["uvicorn", "question_paper:app", "--host", "0.0.0.0", "--port", "7860"]
 
14
 
15
  #Install pytorch ends
16
 
 
 
17
  # Install requirements.txt
18
  RUN pip install --no-cache-dir --upgrade -r /requirements.txt
19
 
20
+ # write access
21
+ RUN useradd -m -u 1000 user
22
+
23
+ USER user
24
+
25
+ ENV HOME=/home/user \
26
+ PATH=/home/user/.local/bin:$PATH
27
+
28
+ WORKDIR $HOME/app
29
+
30
+ COPY --chown=user . $HOME/app
31
+
32
  # Start the FastAPI app on port 7860, the default port expected by Spaces
33
  CMD ["uvicorn", "question_paper:app", "--host", "0.0.0.0", "--port", "7860"]