Spaces:
Runtime error
Runtime error
Commit
·
6cb6ed0
1
Parent(s):
2c719ff
Fix: Add Docker support and fix startup error
Browse files- Dockerfile +18 -0
- README.md +2 -3
- utils.py +2 -3
Dockerfile
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use an official Python runtime as a parent image
|
| 2 |
+
FROM python:3.11-slim
|
| 3 |
+
|
| 4 |
+
# Set the working directory in the container
|
| 5 |
+
WORKDIR /app
|
| 6 |
+
|
| 7 |
+
# Copy the requirements file and install the dependencies
|
| 8 |
+
COPY requirements.txt .
|
| 9 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 10 |
+
|
| 11 |
+
# Copy the rest of the application files
|
| 12 |
+
COPY . .
|
| 13 |
+
|
| 14 |
+
# Make port 7860 available to the world outside this container
|
| 15 |
+
EXPOSE 7860
|
| 16 |
+
|
| 17 |
+
# Run app.py when the container launches
|
| 18 |
+
CMD ["python", "app.py"]
|
README.md
CHANGED
|
@@ -3,9 +3,8 @@ title: Apriel Chat
|
|
| 3 |
emoji: 💬
|
| 4 |
colorFrom: green
|
| 5 |
colorTo: blue
|
| 6 |
-
sdk:
|
| 7 |
-
|
| 8 |
-
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
license: mit
|
| 11 |
short_description: ServiceNow-AI model chat
|
|
|
|
| 3 |
emoji: 💬
|
| 4 |
colorFrom: green
|
| 5 |
colorTo: blue
|
| 6 |
+
sdk: docker
|
| 7 |
+
app_port: 7860
|
|
|
|
| 8 |
pinned: false
|
| 9 |
license: mit
|
| 10 |
short_description: ServiceNow-AI model chat
|
utils.py
CHANGED
|
@@ -15,10 +15,9 @@ models_config = {
|
|
| 15 |
"Apriel-1.5-15B-thinker": {
|
| 16 |
"MODEL_DISPLAY_NAME": "Apriel-1.5-15B-thinker",
|
| 17 |
"MODEL_HF_URL": "https://huggingface.co/ServiceNow-AI/Apriel-1.5-15b-Thinker",
|
| 18 |
-
"MODEL_NAME": os.environ.get("MODEL_NAME_APRIEL_1_5_15B"),
|
| 19 |
-
"VLLM_API_URL": os.environ.get("VLLM_API_URL_APRIEL_1_5_15B"),
|
| 20 |
"VLLM_API_URL_LIST": os.environ.get("VLLM_API_URL_LIST_APRIEL_1_5_15B"),
|
| 21 |
-
"AUTH_TOKEN": os.environ.get("AUTH_TOKEN"),
|
| 22 |
"REASONING": True,
|
| 23 |
"MULTIMODAL": True,
|
| 24 |
"TEMPERATURE": 0.6
|
|
|
|
| 15 |
"Apriel-1.5-15B-thinker": {
|
| 16 |
"MODEL_DISPLAY_NAME": "Apriel-1.5-15B-thinker",
|
| 17 |
"MODEL_HF_URL": "https://huggingface.co/ServiceNow-AI/Apriel-1.5-15b-Thinker",
|
| 18 |
+
"MODEL_NAME": os.environ.get("MODEL_NAME_APRIEL_1_5_15B", "Apriel-1.5-15B-thinker"),
|
| 19 |
+
"VLLM_API_URL": os.environ.get("VLLM_API_URL_APRIEL_1_5_15B", "http://localhost:8080/v1"),
|
| 20 |
"VLLM_API_URL_LIST": os.environ.get("VLLM_API_URL_LIST_APRIEL_1_5_15B"),
|
|
|
|
| 21 |
"REASONING": True,
|
| 22 |
"MULTIMODAL": True,
|
| 23 |
"TEMPERATURE": 0.6
|