Ashley Wright
commited on
Commit
·
71df5b2
1
Parent(s):
9ae35b4
Set max perms for socket(to allow reading by other api)
Browse files- src/main.py +3 -0
src/main.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
from io import BytesIO
|
2 |
from socket import socket, AF_UNIX, SOCK_STREAM
|
3 |
from sys import byteorder
|
|
|
4 |
|
5 |
from pipelines.models import TextToImageRequest
|
6 |
|
@@ -15,6 +16,8 @@ def main():
|
|
15 |
with socket(AF_UNIX, SOCK_STREAM) as inference_socket:
|
16 |
inference_socket.bind(SOCKET)
|
17 |
|
|
|
|
|
18 |
inference_socket.listen(1)
|
19 |
connection, _ = inference_socket.accept()
|
20 |
|
|
|
1 |
from io import BytesIO
|
2 |
from socket import socket, AF_UNIX, SOCK_STREAM
|
3 |
from sys import byteorder
|
4 |
+
from os import chmod
|
5 |
|
6 |
from pipelines.models import TextToImageRequest
|
7 |
|
|
|
16 |
with socket(AF_UNIX, SOCK_STREAM) as inference_socket:
|
17 |
inference_socket.bind(SOCKET)
|
18 |
|
19 |
+
chmod(SOCKET, 0o777)
|
20 |
+
|
21 |
inference_socket.listen(1)
|
22 |
connection, _ = inference_socket.accept()
|
23 |
|