gabcares commited on
Commit
3d474fd
·
verified ·
1 Parent(s): b40bbc0

Update Dockerfile

Browse files

- Create SQLite database directory
- Set permission

Files changed (1) hide show
  1. Dockerfile +30 -24
Dockerfile CHANGED
@@ -1,25 +1,31 @@
1
- FROM python:3.11.9-slim
2
-
3
- # Copy requirements file
4
- COPY requirements.txt .
5
-
6
- # Update pip
7
- RUN pip --timeout=3000 install --no-cache-dir --upgrade pip
8
-
9
- # Install dependecies
10
- RUN pip --timeout=3000 install --no-cache-dir -r requirements.txt
11
-
12
- # Make api
13
- RUN mkdir -p /api/
14
-
15
- # Set app as the working directory
16
- WORKDIR /api
17
-
18
- # Copy api
19
- COPY . .
20
-
21
- # Expose app port Huggingface
22
- EXPOSE 7860
23
-
24
- # Start application
 
 
 
 
 
 
25
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ FROM python:3.11.9-slim
2
+
3
+ # Copy requirements file
4
+ COPY requirements.txt .
5
+
6
+ # Update pip
7
+ RUN pip --timeout=3000 install --no-cache-dir --upgrade pip
8
+
9
+ # Install dependecies
10
+ RUN pip --timeout=3000 install --no-cache-dir -r requirements.txt
11
+
12
+ # Make api
13
+ RUN mkdir -p /api/
14
+
15
+ # Set app as the working directory
16
+ WORKDIR /api
17
+
18
+ # Make sqlite directory
19
+ RUN mkdir -p /api/database/
20
+
21
+ # Set the permissions
22
+ RUN chmod -R 770 /api/database
23
+
24
+ # Copy api
25
+ COPY . .
26
+
27
+ # Expose app port Huggingface
28
+ EXPOSE 7860
29
+
30
+ # Start application
31
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]