kairongLi commited on
Commit
ddc4dbd
·
1 Parent(s): b005e3a

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +19 -0
Dockerfile ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
2
+ # you will also find guides on how best to write your Dockerfile
3
+
4
+ FROM python:3.9
5
+ COPY --from=openjdk:8-jre-slim /usr/local/openjdk-8 /usr/local/openjdk-8
6
+
7
+ ENV JAVA_HOME /usr/local/openjdk-8
8
+ RUN update-alternatives --install /usr/bin/java java /usr/local/openjdk-8/bin/java 1
9
+
10
+
11
+ WORKDIR /code
12
+
13
+ COPY ./requirements.txt /code/requirements.txt
14
+
15
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
16
+
17
+ COPY . .
18
+
19
+ CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]