Spaces:
Sleeping
Sleeping
Upload Dockerfile
Browse files- Dockerfile +18 -0
Dockerfile
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use the official Python image from Docker Hub
|
2 |
+
FROM python:3.9-slim
|
3 |
+
|
4 |
+
# Set the working directory inside the container
|
5 |
+
WORKDIR /app
|
6 |
+
|
7 |
+
# Copy the local FastAPI app to the container
|
8 |
+
COPY . /app
|
9 |
+
|
10 |
+
# Install the necessary dependencies
|
11 |
+
RUN pip install --no-cache-dir --upgrade pip && \
|
12 |
+
pip install fastapi uvicorn huggingface_hub pydantic
|
13 |
+
|
14 |
+
# Expose port 80 for FastAPI
|
15 |
+
EXPOSE 80
|
16 |
+
|
17 |
+
# Set the entry point for the application
|
18 |
+
CMD ["uvicorn", "new:app", "--host", "0.0.0.0", "--port", "80"]
|