Create Dockerfile
Browse files- Dockerfile +31 -0
Dockerfile
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use official Python image
|
2 |
+
FROM python:3.10-slim
|
3 |
+
|
4 |
+
# Set environment variables
|
5 |
+
ENV PYTHONDONTWRITEBYTECODE=1 \
|
6 |
+
PYTHONUNBUFFERED=1
|
7 |
+
|
8 |
+
# Set work directory
|
9 |
+
WORKDIR /app
|
10 |
+
|
11 |
+
# Install system dependencies
|
12 |
+
RUN apt-get update && apt-get install -y \
|
13 |
+
git \
|
14 |
+
&& rm -rf /var/lib/apt/lists/*
|
15 |
+
|
16 |
+
# Clone the repo
|
17 |
+
RUN git clone https://github.com/Aws-killer/ImageEditor.git .
|
18 |
+
|
19 |
+
# Install Python dependencies
|
20 |
+
COPY requirements.txt .
|
21 |
+
RUN pip install --upgrade pip
|
22 |
+
RUN pip install -r requirements.txt
|
23 |
+
|
24 |
+
# Copy the rest of the app (in case Docker context is local dev)
|
25 |
+
COPY . .
|
26 |
+
|
27 |
+
# Expose the FastAPI port
|
28 |
+
EXPOSE 7860
|
29 |
+
|
30 |
+
# Start the FastAPI app
|
31 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|