Spaces:
Runtime error
Runtime error
Create Dockerfile
Browse files- Dockerfile +19 -0
Dockerfile
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use the official Python image from Docker Hub
|
| 2 |
+
FROM python:3.10-slim
|
| 3 |
+
|
| 4 |
+
# Set the working directory
|
| 5 |
+
WORKDIR /app
|
| 6 |
+
|
| 7 |
+
# Copy requirements.txt and install the dependencies
|
| 8 |
+
COPY requirements.txt requirements.txt
|
| 9 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 10 |
+
|
| 11 |
+
# Copy the application files
|
| 12 |
+
COPY app.py app.py
|
| 13 |
+
COPY entrypoint.sh entrypoint.sh
|
| 14 |
+
|
| 15 |
+
# Make entrypoint.sh executable
|
| 16 |
+
RUN chmod +x entrypoint.sh
|
| 17 |
+
|
| 18 |
+
# Set the entrypoint
|
| 19 |
+
ENTRYPOINT ["./entrypoint.sh"]
|