Spaces:
Sleeping
Sleeping
Create Dockerfile
Browse files- Dockerfile +23 -0
Dockerfile
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use official HuggingFace inference API image
|
| 2 |
+
FROM python:3.10
|
| 3 |
+
|
| 4 |
+
# Set working directory
|
| 5 |
+
WORKDIR /code
|
| 6 |
+
|
| 7 |
+
# Install system dependencies
|
| 8 |
+
RUN apt-get update && apt-get install -y git
|
| 9 |
+
|
| 10 |
+
# Copy requirement file first (for caching)
|
| 11 |
+
COPY requirements.txt /code/requirements.txt
|
| 12 |
+
|
| 13 |
+
# Install Python dependencies
|
| 14 |
+
RUN pip install --no-cache-dir -r /code/requirements.txt
|
| 15 |
+
|
| 16 |
+
# Copy API code
|
| 17 |
+
COPY checkin_or_not_API.py /code/app.py
|
| 18 |
+
|
| 19 |
+
# Expose port (HuggingFace uses 7860 by default)
|
| 20 |
+
EXPOSE 7860
|
| 21 |
+
|
| 22 |
+
# Start the FastAPI server
|
| 23 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|