docker for chatbot
Browse files(cherry picked from commit 8523f066d3a49c605da3a187af8c21da88619929)
- Dockerfile +18 -0
Dockerfile
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Step 1: Choose a base Python image
|
2 |
+
FROM python:3.10-slim
|
3 |
+
|
4 |
+
# Step 2: Set a working directory
|
5 |
+
WORKDIR /home/user/app
|
6 |
+
|
7 |
+
# Step 3: Copy all your code into the container
|
8 |
+
COPY . /home/user/app
|
9 |
+
|
10 |
+
# Step 4: Install dependencies
|
11 |
+
# - If you rely on pyproject.toml (poetry or setuptools):
|
12 |
+
RUN pip install --no-cache-dir .
|
13 |
+
|
14 |
+
# Step 5: Expose a port (optional, helps clarity, though HF Spaces auto-detects)
|
15 |
+
EXPOSE 7860
|
16 |
+
|
17 |
+
# Step 6: Command to run your Gradio app (or any Python script)
|
18 |
+
CMD ["python", "app.py"]
|