carloscar commited on
Commit
fae6fdf
1 Parent(s): bb5b380

permission fixes

Browse files
Files changed (2) hide show
  1. Dockerfile +2 -2
  2. run.py +1 -1
Dockerfile CHANGED
@@ -85,7 +85,7 @@ RUN git clone https://github.com/Mikubill/sd-webui-controlnet /app/stable-diffus
85
  # Prepare WebUI environment
86
  WORKDIR /app/stable-diffusion-webui
87
  COPY config.json ui-config.json /app/stable-diffusion-webui/
88
- RUN python launch.py --exit --skip-torch-cuda-test
89
 
90
  RUN sed -i -e 's/ show_progress=False,/ show_progress=True,/g' modules/ui.py
91
  RUN sed -i -e 's/shared.demo.launch/shared.demo.queue().launch/g' webui.py
@@ -97,7 +97,7 @@ RUN chmod +x on_start.sh
97
 
98
  # Run app as non-root user
99
  RUN adduser --disabled-password --gecos '' user
100
- RUN chown -R user:user /app
101
  USER user
102
 
103
  EXPOSE 7860
 
85
  # Prepare WebUI environment
86
  WORKDIR /app/stable-diffusion-webui
87
  COPY config.json ui-config.json /app/stable-diffusion-webui/
88
+ RUN /opt/venv/bin/python launch.py --exit --skip-torch-cuda-test
89
 
90
  RUN sed -i -e 's/ show_progress=False,/ show_progress=True,/g' modules/ui.py
91
  RUN sed -i -e 's/shared.demo.launch/shared.demo.queue().launch/g' webui.py
 
97
 
98
  # Run app as non-root user
99
  RUN adduser --disabled-password --gecos '' user
100
+ RUN chown -R user:user /app /opt/venv
101
  USER user
102
 
103
  EXPOSE 7860
run.py CHANGED
@@ -4,7 +4,7 @@ import sys
4
 
5
 
6
  def on_start():
7
- print("Executing './on_start.sh' (downloading models, etc.)")
8
  result = subprocess.run("./on_start.sh", shell=True, env=os.environ)
9
  if result.returncode != 0:
10
  raise RuntimeError(f"Error executing ./on_start.sh [exit code: {result.returncode}]")
 
4
 
5
 
6
  def on_start():
7
+ print("Executing './on_start.sh' (that installs xformers, downloads models, etc.)")
8
  result = subprocess.run("./on_start.sh", shell=True, env=os.environ)
9
  if result.returncode != 0:
10
  raise RuntimeError(f"Error executing ./on_start.sh [exit code: {result.returncode}]")