Spaces:
Sleeping
Sleeping
abhishekrs4
commited on
Commit
•
e85b12f
1
Parent(s):
0806746
added dockerfile
Browse files- Dockerfile +22 -0
Dockerfile
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.8.10-slim
|
2 |
+
|
3 |
+
WORKDIR /app
|
4 |
+
|
5 |
+
# install linux package dependencies
|
6 |
+
RUN apt-get update -y
|
7 |
+
RUN apt-get install -y libgomp1
|
8 |
+
|
9 |
+
# can copy files only from current working directory where docker builds
|
10 |
+
# cannot copy files from arbitrary directories
|
11 |
+
|
12 |
+
COPY ./trained_models/knn_ada_boost /data/models/knn_ada_boost
|
13 |
+
COPY ./requirements.txt .
|
14 |
+
|
15 |
+
RUN pip install -r requirements.txt
|
16 |
+
|
17 |
+
COPY ./modeling/*.py ./modeling/
|
18 |
+
COPY ./*.py .
|
19 |
+
|
20 |
+
EXPOSE 5000
|
21 |
+
|
22 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "5000", "--reload"]
|