Shabdobhedi commited on
Commit
919dc32
·
verified ·
1 Parent(s): 9c712e1

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -2
Dockerfile CHANGED
@@ -7,8 +7,14 @@ COPY . .
7
  # Set the working directory to /
8
  WORKDIR /
9
 
10
- # Install requirements.txt
 
 
 
 
 
 
11
  RUN pip install --no-cache-dir --upgrade -r /requirements.txt
12
 
13
  # Start the FastAPI app on port 7860, the default port expected by Spaces
14
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
7
  # Set the working directory to /
8
  WORKDIR /
9
 
10
+ # Create a virtual environment
11
+ RUN python3 -m venv /opt/venv
12
+
13
+ # Activate the virtual environment
14
+ ENV PATH="/opt/venv/bin:$PATH"
15
+
16
+ # Install requirements.txt 
17
  RUN pip install --no-cache-dir --upgrade -r /requirements.txt
18
 
19
  # Start the FastAPI app on port 7860, the default port expected by Spaces
20
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]