Create Dockerfile
Browse files- Dockerfile +19 -0
Dockerfile
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use a CUDA-enabled base image
|
2 |
+
FROM nvidia/cuda:12.1.1-base-ubuntu22.04
|
3 |
+
|
4 |
+
# Install Python & pip
|
5 |
+
RUN apt update && apt install -y python3 python3-pip
|
6 |
+
|
7 |
+
# Install dependencies
|
8 |
+
COPY requirements.txt /app/requirements.txt
|
9 |
+
WORKDIR /app
|
10 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
11 |
+
|
12 |
+
# Copy chatbot files
|
13 |
+
COPY app.py /app/app.py
|
14 |
+
|
15 |
+
# Expose FastAPI on port 7860
|
16 |
+
EXPOSE 7860
|
17 |
+
|
18 |
+
# Run FastAPI
|
19 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|