SENODROOM commited on
Commit
4b82bb3
·
1 Parent(s): 081d2be

DEPLOYMENT FIXED

Browse files
Files changed (3) hide show
  1. Dockerfile +7 -4
  2. README.md +10 -0
  3. docs/DEPLOYMENT.md +1 -1
Dockerfile CHANGED
@@ -1,9 +1,12 @@
1
- FROM pytorch/pytorch:2.7.1-cuda12.6-cudnn9-runtime
2
  WORKDIR /app
3
  ENV PYTHONDONTWRITEBYTECODE=1
4
  ENV PYTHONUNBUFFERED=1
 
 
5
  COPY requirements.txt ./
6
- RUN pip install --no-cache-dir -r requirements.txt
 
7
  COPY . .
8
- EXPOSE 8000
9
- CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
 
1
+ FROM python:3.12-slim
2
  WORKDIR /app
3
  ENV PYTHONDONTWRITEBYTECODE=1
4
  ENV PYTHONUNBUFFERED=1
5
+ ENV APP_HOST=0.0.0.0
6
+ ENV APP_PORT=7860
7
  COPY requirements.txt ./
8
+ RUN pip install --no-cache-dir --upgrade pip \
9
+ && pip install --no-cache-dir -r requirements.txt
10
  COPY . .
11
+ EXPOSE 7860
12
+ CMD uvicorn app.main:app --host "${APP_HOST}" --port "${APP_PORT}"
README.md CHANGED
@@ -1,3 +1,13 @@
 
 
 
 
 
 
 
 
 
 
1
  # GitHub Profile AI Reviewer
2
 
3
  FastAPI service that rates a public GitHub user profile out of 100.
 
1
+ ---
2
+ title: GitHub Profile AI Reviewer
3
+ emoji: 🧪
4
+ colorFrom: green
5
+ colorTo: blue
6
+ sdk: docker
7
+ app_port: 7860
8
+ pinned: false
9
+ ---
10
+
11
  # GitHub Profile AI Reviewer
12
 
13
  FastAPI service that rates a public GitHub user profile out of 100.
docs/DEPLOYMENT.md CHANGED
@@ -86,7 +86,7 @@ COPY . .
86
 
87
  EXPOSE 7860
88
 
89
- CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
90
  ```
91
 
92
  Why this differs from local Docker:
 
86
 
87
  EXPOSE 7860
88
 
89
+ CMD uvicorn app.main:app --host "${APP_HOST}" --port "${APP_PORT}"
90
  ```
91
 
92
  Why this differs from local Docker: