radames commited on
Commit
8122c97
·
1 Parent(s): 1d5ab09

disable API

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -3
Dockerfile CHANGED
@@ -48,11 +48,12 @@ WORKDIR $HOME/app
48
  RUN git clone https://github.com/lllyasviel/Fooocus . && \
49
  # pin to a specific commit
50
  git checkout 18a8c6655208c31216b83bd93381cb12993597c2 && \
51
- # remove the next line if you're running on your own GPU
52
- sed -i "s|image_number = gr.Slider(label='Image Number', minimum=1, maximum=32|image_number = gr.Slider(label='Image Number', minimum=1, maximum=3|" webui.py && \
53
  pip install --no-cache-dir -r requirements_versions.txt --extra-index-url https://download.pytorch.org/whl/cu118
54
 
55
- # Checkpoints
 
 
 
56
 
57
  ENV HOME=/home/user \
58
  PATH=/home/user/.local/bin:$PATH \
 
48
  RUN git clone https://github.com/lllyasviel/Fooocus . && \
49
  # pin to a specific commit
50
  git checkout 18a8c6655208c31216b83bd93381cb12993597c2 && \
 
 
51
  pip install --no-cache-dir -r requirements_versions.txt --extra-index-url https://download.pytorch.org/whl/cu118
52
 
53
+ # remove the next line if you're running on your own GPU, it set max images to 3 and disables the API
54
+ RUN sed -i "s|image_number = gr.Slider(label='Image Number', minimum=1, maximum=32|image_number = gr.Slider(label='Image Number', minimum=1, maximum=3|" webui.py && \
55
+ sed -i "s|shared.gradio_root = gr.Blocks(title='Fooocus ' + fooocus_version.version, css=modules.html.css).queue()|shared.gradio_root = gr.Blocks(title='Fooocus ' + fooocus_version.version, css=modules.html.css).queue(api_open=False)|" webui.py && \
56
+ sed -i "s|shared.gradio_root.launch(inbrowser=True, server_name=args.listen, server_port=args.port, share=args.share)|shared.gradio_root.launch(inbrowser=True, server_name=args.listen, server_port=args.port, share=args.share, show_api=False)|" webui.py
57
 
58
  ENV HOME=/home/user \
59
  PATH=/home/user/.local/bin:$PATH \