Priyanshu Kumar
commited on
Commit
·
db251fb
1
Parent(s):
8f92502
Switch to Docker SDK for FastAPI app
Browse files- .huggingface.yaml +4 -1
- DOCKERFILE +16 -0
- README.md +0 -2
.huggingface.yaml
CHANGED
@@ -1,4 +1,7 @@
|
|
1 |
-
sdk:
|
|
|
|
|
|
|
2 |
pinned: false
|
3 |
python_version: "3.10"
|
4 |
entrypoint: app.py
|
|
|
1 |
+
sdk: docker
|
2 |
+
app_file: app.py
|
3 |
+
title: OpenHermes Mistral API
|
4 |
+
emoji: 🧠
|
5 |
pinned: false
|
6 |
python_version: "3.10"
|
7 |
entrypoint: app.py
|
DOCKERFILE
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.10
|
2 |
+
|
3 |
+
# Set up working directory
|
4 |
+
WORKDIR /code
|
5 |
+
|
6 |
+
# Copy files
|
7 |
+
COPY . .
|
8 |
+
|
9 |
+
# Install dependencies
|
10 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
11 |
+
|
12 |
+
# Expose port
|
13 |
+
EXPOSE 7860
|
14 |
+
|
15 |
+
# Start FastAPI using uvicorn
|
16 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
README.md
CHANGED
@@ -3,8 +3,6 @@ title: OpenHermes Mistral API
|
|
3 |
emoji: 🧠
|
4 |
colorFrom: gray
|
5 |
colorTo: blue
|
6 |
-
python_version: 3.10
|
7 |
-
app_file: app.py
|
8 |
pinned: false
|
9 |
short_description: This API is for AnalyDocs
|
10 |
---
|
|
|
3 |
emoji: 🧠
|
4 |
colorFrom: gray
|
5 |
colorTo: blue
|
|
|
|
|
6 |
pinned: false
|
7 |
short_description: This API is for AnalyDocs
|
8 |
---
|