Spaces:
Sleeping
Sleeping
use python3 explicitly, add startup logging
Browse filesFiles changed (2)
- Dockerfile+1-1
- app.py+5-1
1 unmodified line23451 unmodified lineWORKDIR /appCOPY app.py .EXPOSE 7860CMD ["python", "-u", "app.py"]1 unmodified line23451 unmodified lineWORKDIR /appCOPY app.py .EXPOSE 7860CMD ["python3", "-u", "app.py"]
123456 unmodified lines12131415import http.serverimport jsonclass Handler(http.server.BaseHTTPRequestHandler):def do_GET(self):6 unmodified linesdef log_message(self, format, *args):passhttp.server.HTTPServer(("0.0.0.0", 7860), Handler).serve_forever()1234566 unmodified lines13141516171819import http.serverimport jsonimport sysclass Handler(http.server.BaseHTTPRequestHandler):def do_GET(self):6 unmodified linesdef log_message(self, format, *args):passif __name__ == "__main__":sys.stderr.write(f"Binding to 0.0.0.0:7860\n")sys.stderr.flush()http.server.HTTPServer(("0.0.0.0", 7860), Handler).serve_forever()
Dockerfile+1-1
app.py+5-1