binuser007 commited on
Commit
2bce26f
·
verified ·
1 Parent(s): 5fa507f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -1
Dockerfile CHANGED
@@ -31,8 +31,10 @@ ENV KATANA_CONFIG=/tmp/katana
31
  RUN python3 -m venv /app/venv
32
  ENV PATH="/app/venv/bin:$PATH"
33
 
34
- # Install Python dependencies in the virtual environment
35
  COPY requirements.txt /app/requirements.txt
 
 
36
  RUN pip install --upgrade pip \
37
  && pip install -r /app/requirements.txt
38
 
@@ -42,6 +44,10 @@ COPY app.py /app/app.py
42
  # Set the working directory
43
  WORKDIR /app
44
 
 
 
 
 
45
  # Expose the port Gradio will run on
46
  EXPOSE 7860
47
 
 
31
  RUN python3 -m venv /app/venv
32
  ENV PATH="/app/venv/bin:$PATH"
33
 
34
+ # Copy requirements file
35
  COPY requirements.txt /app/requirements.txt
36
+
37
+ # Install Python dependencies in the virtual environment
38
  RUN pip install --upgrade pip \
39
  && pip install -r /app/requirements.txt
40
 
 
44
  # Set the working directory
45
  WORKDIR /app
46
 
47
+ # Create a non-root user and switch to it
48
+ RUN useradd -m myuser
49
+ USER myuser
50
+
51
  # Expose the port Gradio will run on
52
  EXPOSE 7860
53