Create Dockerfile
Browse files- Dockerfile +24 -0
Dockerfile
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use official Python image as base
|
| 2 |
+
FROM python:3.9
|
| 3 |
+
|
| 4 |
+
# Set the working directory inside the container
|
| 5 |
+
WORKDIR /app
|
| 6 |
+
|
| 7 |
+
# Copy requirements if you have one (optional)
|
| 8 |
+
# COPY requirements.txt .
|
| 9 |
+
# RUN pip install -r requirements.txt
|
| 10 |
+
|
| 11 |
+
# Install dependencies
|
| 12 |
+
RUN pip install flask pillow
|
| 13 |
+
|
| 14 |
+
# Copy the application files into the container
|
| 15 |
+
COPY . .
|
| 16 |
+
|
| 17 |
+
# Create the output directory and set permissions
|
| 18 |
+
RUN mkdir -p /app/output && chmod -R 777 /app/output
|
| 19 |
+
|
| 20 |
+
# Expose port 5000 for Flask
|
| 21 |
+
EXPOSE 7860
|
| 22 |
+
|
| 23 |
+
# Start the Flask app
|
| 24 |
+
CMD ["python", "app.py"]
|