Browse Source

fastapi 监听的 http 端口修改为 7070

reghao 4 weeks ago
parent
commit
c694abc331
2 changed files with 3 additions and 3 deletions
  1. 2 2
      Dockerfile
  2. 1 1
      ai_server.py

+ 2 - 2
Dockerfile

@@ -18,6 +18,6 @@ RUN pip3 install --no-cache-dir --upgrade -r /app/requirements.txt
 
 COPY . /app
 
-EXPOSE 8010
+EXPOSE 7070
 
-CMD ["sh", "-c", "uvicorn ai_server:app --host 0.0.0.0 --port 8010"]
+CMD ["sh", "-c", "uvicorn ai_server:app --host 0.0.0.0 --port 7070"]

+ 1 - 1
ai_server.py

@@ -37,4 +37,4 @@ async def root():
 
 if __name__ == "__main__":
     import uvicorn
-    uvicorn.run(app, host="0.0.0.0", port=8010)
+    uvicorn.run(app, host="0.0.0.0", port=7070)