sotiriskot commited on
Commit
e9e08f3
·
verified ·
1 Parent(s): 932acc8

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +31 -0
Dockerfile ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM intelligencenoborders/scinobo-taxonomy-mapper:v0.1.0
2
+
3
+ # Copy files
4
+ COPY download_model.py /app
5
+
6
+ RUN useradd -m -u 1000 user
7
+ RUN chown -R user /app
8
+ USER user
9
+ ENV HOME=/home/user \
10
+ PATH=/home/user/.local/bin:$PATH
11
+
12
+ # Run the download
13
+ RUN python /app/download_model.py
14
+
15
+ # download nltk punkt and stopwords
16
+ RUN python3 -c "import nltk; nltk.download('punkt'); nltk.download('stopwords')"
17
+
18
+ # Set the working directory in the container
19
+ WORKDIR /app/src
20
+
21
+ # Expose the port that Gradio will run on
22
+ EXPOSE 7860
23
+
24
+ ENV PYTHONUNBUFFERED=1 \
25
+ GRADIO_ALLOW_FLAGGING=never \
26
+ GRADIO_NUM_PORTS=1 \
27
+ GRADIO_SERVER_NAME=0.0.0.0 \
28
+ SYSTEM=spaces
29
+
30
+ # Run app.py when the container launches
31
+ CMD ["python", "-m", "fos_mapper.server.gradio_app"]