Spaces:
Runtime error
Runtime error
Create Dockerfile
Browse files- Dockerfile +23 -0
Dockerfile
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use the official Python image as the base
|
2 |
+
FROM python:3.9
|
3 |
+
|
4 |
+
# Set environment variable for API_URL (default value)
|
5 |
+
ENV LMSTUDIO_URL="http://localhost:1234/v1"
|
6 |
+
ENV LMSTUDIO_KEY="lm-studio"
|
7 |
+
ENV LMSTUDIO_MODEL="model-identifier"
|
8 |
+
|
9 |
+
# Set working directory
|
10 |
+
WORKDIR /app
|
11 |
+
|
12 |
+
# Copy requirements file and install dependencies
|
13 |
+
COPY requirements.txt .
|
14 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
15 |
+
|
16 |
+
# Copy your Python code into the container
|
17 |
+
COPY . .
|
18 |
+
|
19 |
+
# Expose port 5000 (assuming your app runs on this port)
|
20 |
+
EXPOSE 5000
|
21 |
+
|
22 |
+
# Command to run your app
|
23 |
+
CMD ["python", "main.py", "lmstudio"]
|