docker changes
Browse files- Dockerfile +9 -2
- main_noweb.py +3 -3
Dockerfile
CHANGED
@@ -40,12 +40,19 @@ USER user
|
|
40 |
|
41 |
# Set home to the user's home directory
|
42 |
ENV HOME=/home/user \
|
43 |
-
PATH=/home/user/.local/bin:$PATH
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
|
45 |
# Set the working directory to the user's home directory
|
46 |
WORKDIR $HOME/app
|
47 |
|
48 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
49 |
-
COPY --chown=user . $HOME/app
|
50 |
|
51 |
CMD ["python3", "main_noweb.py"]
|
|
|
40 |
|
41 |
# Set home to the user's home directory
|
42 |
ENV HOME=/home/user \
|
43 |
+
PATH=/home/user/.local/bin:$PATH \
|
44 |
+
PYTHONPATH=$HOME/app \
|
45 |
+
PYTHONUNBUFFERED=1 \
|
46 |
+
GRADIO_ALLOW_FLAGGING=never \
|
47 |
+
GRADIO_NUM_PORTS=1 \
|
48 |
+
GRADIO_SERVER_NAME=0.0.0.0 \
|
49 |
+
GRADIO_THEME=huggingface \
|
50 |
+
SYSTEM=spaces
|
51 |
|
52 |
# Set the working directory to the user's home directory
|
53 |
WORKDIR $HOME/app
|
54 |
|
55 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
56 |
+
COPY --chown=user . $HOME/app
|
57 |
|
58 |
CMD ["python3", "main_noweb.py"]
|
main_noweb.py
CHANGED
@@ -269,9 +269,9 @@ if __name__ == "__main__":
|
|
269 |
max_size=25, # Maximum number of requests that the queue processes
|
270 |
api_open = False # When creating a Gradio demo, you may want to restrict all traffic to happen through the user interface as opposed to the programmatic API that is automatically created for your Gradio demo.
|
271 |
) # https://www.gradio.app/guides/setting-up-a-demo-for-maximum-performance
|
272 |
-
block.launch(server_name="0.0.0.0",
|
273 |
-
share=True,#,
|
274 |
-
server_port=7860
|
275 |
)
|
276 |
|
277 |
|
|
|
269 |
max_size=25, # Maximum number of requests that the queue processes
|
270 |
api_open = False # When creating a Gradio demo, you may want to restrict all traffic to happen through the user interface as opposed to the programmatic API that is automatically created for your Gradio demo.
|
271 |
) # https://www.gradio.app/guides/setting-up-a-demo-for-maximum-performance
|
272 |
+
block.launch(#server_name="0.0.0.0",
|
273 |
+
#share=True,#,
|
274 |
+
#server_port=7860
|
275 |
)
|
276 |
|
277 |
|