Update Dockerfile
Browse files- Dockerfile +1 -18
Dockerfile
CHANGED
|
@@ -9,21 +9,4 @@ COPY --chown=user ./requirements.txt requirements.txt
|
|
| 9 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 10 |
COPY --chown=user . .
|
| 11 |
|
| 12 |
-
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
| 13 |
-
```
|
| 14 |
-
|
| 15 |
-
> **Important:** Hugging Face expects port **7860** specifically — this is how Spaces detect and serve your app.
|
| 16 |
-
|
| 17 |
-
---
|
| 18 |
-
|
| 19 |
-
## Step 3: Deploy
|
| 20 |
-
|
| 21 |
-
Once you save all three files, the Space automatically starts building. Watch the **Logs** tab — when it says **Running**, your API is live.
|
| 22 |
-
|
| 23 |
-
---
|
| 24 |
-
|
| 25 |
-
## Step 4: Test It
|
| 26 |
-
|
| 27 |
-
Your endpoint is now live at:
|
| 28 |
-
```
|
| 29 |
-
https://<username>-<space-name>.hf.space/v1/chat
|
|
|
|
| 9 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 10 |
COPY --chown=user . .
|
| 11 |
|
| 12 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|