Create Dockerfile
Browse files- Dockerfile +21 -0
Dockerfile
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use an official Python runtime as the base image
|
2 |
+
FROM python:3.9-slim
|
3 |
+
|
4 |
+
# Set environment variables
|
5 |
+
ENV PYTHONUNBUFFERED=1
|
6 |
+
|
7 |
+
# Set the working directory
|
8 |
+
WORKDIR /app
|
9 |
+
|
10 |
+
# Copy the requirements file and install dependencies
|
11 |
+
COPY requirements.txt .
|
12 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
13 |
+
|
14 |
+
# Copy the application code
|
15 |
+
COPY . .
|
16 |
+
|
17 |
+
# Expose the port Gradio will run on
|
18 |
+
EXPOSE 7860
|
19 |
+
|
20 |
+
# Command to run the application
|
21 |
+
CMD ["python", "app.py"]
|