binuser007 commited on
Commit
016f93e
·
verified ·
1 Parent(s): 2bce26f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -2
Dockerfile CHANGED
@@ -27,6 +27,15 @@ RUN mkdir -p /tmp/katana
27
  # Set the environment variable for Katana's config directory
28
  ENV KATANA_CONFIG=/tmp/katana
29
 
 
 
 
 
 
 
 
 
 
30
  # Create and activate a virtual environment for Python
31
  RUN python3 -m venv /app/venv
32
  ENV PATH="/app/venv/bin:$PATH"
@@ -44,8 +53,7 @@ COPY app.py /app/app.py
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
 
27
  # Set the environment variable for Katana's config directory
28
  ENV KATANA_CONFIG=/tmp/katana
29
 
30
+ # Create a non-root user
31
+ RUN useradd -m myuser
32
+
33
+ # Change ownership of the /tmp/katana directory to myuser
34
+ RUN chown -R myuser:myuser /tmp/katana
35
+
36
+ # Set appropriate permissions
37
+ RUN chmod 755 /tmp/katana
38
+
39
  # Create and activate a virtual environment for Python
40
  RUN python3 -m venv /app/venv
41
  ENV PATH="/app/venv/bin:$PATH"
 
53
  # Set the working directory
54
  WORKDIR /app
55
 
56
+ # Switch to the non-root user
 
57
  USER myuser
58
 
59
  # Expose the port Gradio will run on