Mbonea commited on
Commit
9f58d17
·
1 Parent(s): 683eea7
Files changed (1) hide show
  1. Dockerfile +7 -8
Dockerfile CHANGED
@@ -30,14 +30,13 @@ COPY requirements.txt .
30
  RUN pip install --no-cache-dir -r requirements.txt
31
 
32
 
33
- RUN git clone https://github.com/BrokenSource/DepthFlow.git /tmp/DepthFlow \
34
- && cd /tmp/DepthFlow \
35
- && git checkout 3f518988eaba01fc7712228ec56756658bcfdb04 \
36
- && pip install -e .
37
- # Copy the application code
38
- USER admin
39
-
40
- COPY --chown=admin . /srv
41
 
42
  # Command to run the application
43
  CMD uvicorn App.app:app --host 0.0.0.0 --port 7860 --workers 1
 
30
  RUN pip install --no-cache-dir -r requirements.txt
31
 
32
 
33
+ # Create a non-root user and give it sudo privileges
34
+ RUN useradd -m appuser && echo "appuser ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/appuser && chmod 0440 /etc/sudoers.d/appuser
35
+
36
+ # Switch to the non-root user
37
+ USER appuser
38
+
39
+ COPY --chown=appuser . /srv
 
40
 
41
  # Command to run the application
42
  CMD uvicorn App.app:app --host 0.0.0.0 --port 7860 --workers 1