kandi1clickkits commited on
Commit
2a40f30
·
1 Parent(s): 5c6b733

chart code with DB

Browse files
Files changed (1) hide show
  1. Dockerfile +24 -3
Dockerfile CHANGED
@@ -1,11 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  FROM python:3.9
2
 
 
3
  WORKDIR /code
4
 
5
- COPY ./requirements.txt /code/requirements.txt
 
 
 
 
6
 
 
7
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
8
 
9
- COPY . .
 
10
 
11
- CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
1
+ # FROM python:3.9
2
+
3
+ # WORKDIR /code
4
+
5
+ # COPY ./requirements.txt /code/requirements.txt
6
+
7
+ # RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
8
+
9
+ # COPY . .
10
+
11
+ # CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
12
+
13
+ # Use the official Python image
14
  FROM python:3.9
15
 
16
+ # Set the working directory in the container
17
  WORKDIR /code
18
 
19
+ # Create a directory for the SQLite database file
20
+ RUN mkdir /data && chmod 777 /data
21
+
22
+ # Copy the requirements file into the container at /code
23
+ COPY ./requirements.txt /code/
24
 
25
+ # Install any needed packages specified in requirements.txt
26
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
27
 
28
+ # Copy the rest of the application code into the container at /code
29
+ COPY . /code/
30
 
31
+ # Command to run on container start
32
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]