flokabukie
commited on
Commit
•
a5475c4
1
Parent(s):
8be2135
Create Dockerfile
Browse files- Dockerfile +17 -0
Dockerfile
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Base image
|
2 |
+
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.7
|
3 |
+
|
4 |
+
# Set working directory
|
5 |
+
WORKDIR /app
|
6 |
+
|
7 |
+
# Copy the API files to the container
|
8 |
+
COPY . /app
|
9 |
+
|
10 |
+
# Install dependencies
|
11 |
+
RUN pip install --no-cache-dir fastapi pydantic uvicorn scikit-learn joblib pandas numpy
|
12 |
+
|
13 |
+
# Expose the API port
|
14 |
+
EXPOSE 80
|
15 |
+
|
16 |
+
# Start the API
|
17 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "80"]
|