Kavin1701 commited on
Commit
4a75c69
·
verified ·
1 Parent(s): 93916c1

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -10
Dockerfile CHANGED
@@ -1,19 +1,23 @@
1
  FROM python:3.10
2
 
3
  # Set the working directory
4
- WORKDIR /app
5
 
6
  # Copy the requirements file and install dependencies
7
- COPY requirements.txt requirements.txt
8
  RUN apt-get update && apt-get install -y git ffmpeg
9
- RUN pip install --no-cache-dir -r requirements.txt
10
- RUN pip install --no-cache-dir "git+https://github.com/openai/whisper.git"
11
 
12
- # Copy the entire application
13
- COPY . .
 
 
 
14
 
15
- # Expose the necessary port
16
- EXPOSE 7860
 
 
17
 
18
- # Set the entry point for Hugging Face Spaces
19
- CMD ["python", "fastapi_app.py"]
 
1
  FROM python:3.10
2
 
3
  # Set the working directory
4
+ WORKDIR /code
5
 
6
  # Copy the requirements file and install dependencies
7
+ COPY ./requirements.txt /code/requirements.txt
8
  RUN apt-get update && apt-get install -y git ffmpeg
9
+ RUN pip install -r requirements.txt
10
+ RUN pip install "git+https://github.com/openai/whisper.git"
11
 
12
+ RUN useradd user
13
+ USER user
14
+
15
+ ENV HOME=/home/user \
16
+ PATH=/home/user/.local/bin:$PATH
17
 
18
+ WORKDIR $HOME/app
19
+
20
+ # Copy the entire application
21
+ COPY --chown=user . $HOME/app
22
 
23
+ CMD ["uvicorn", "fastapi_app:app", "--host", "0.0.0.0", "--port", "8000"]