Spaces:
Sleeping
Sleeping
abhishekrs4
commited on
Commit
•
43fe2d5
1
Parent(s):
aeecd08
added dockerfile
Browse files- Dockerfile +23 -0
Dockerfile
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.8.10-slim
|
2 |
+
|
3 |
+
WORKDIR /app
|
4 |
+
|
5 |
+
# install linux package dependencies
|
6 |
+
RUN apt-get update -y
|
7 |
+
|
8 |
+
# can copy files only from current working directory where docker builds
|
9 |
+
# cannot copy files from arbitrary directories
|
10 |
+
|
11 |
+
COPY ./trained_models/ /data/models/
|
12 |
+
COPY ./requirements_deployment.txt .
|
13 |
+
|
14 |
+
RUN pip install torch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 --index-url https://download.pytorch.org/whl/cpu
|
15 |
+
RUN pip install -r requirements_deployment.txt
|
16 |
+
|
17 |
+
COPY ./modeling/*.py ./modeling/
|
18 |
+
COPY ./*.py .
|
19 |
+
COPY ./*.json .
|
20 |
+
|
21 |
+
EXPOSE 7860
|
22 |
+
|
23 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--reload"]
|