Spaces:
Running
Running
Initial commit
Browse files- Dockerfile +19 -0
Dockerfile
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.10
|
2 |
+
|
3 |
+
WORKDIR /app
|
4 |
+
|
5 |
+
# Copy requirements and install
|
6 |
+
COPY requirements.txt .
|
7 |
+
RUN pip install --no-cache-dir --upgrade pip && \
|
8 |
+
pip install --no-cache-dir -r requirements.txt
|
9 |
+
|
10 |
+
# Copy your FastAPI code and model
|
11 |
+
COPY app.py /app/
|
12 |
+
COPY model /app/model
|
13 |
+
|
14 |
+
# Expose the default Spaces port
|
15 |
+
EXPOSE 7860
|
16 |
+
|
17 |
+
# Start FastAPI (using uvicorn)
|
18 |
+
ENV PORT 7860
|
19 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|