slimshadow commited on
Commit
630d3b4
·
verified ·
1 Parent(s): 3ca2d62

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -12
Dockerfile CHANGED
@@ -1,18 +1,19 @@
1
- # Read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
2
- # you will also find guides on how best to write your Dockerfile
3
 
4
- FROM python:3.9
5
-
6
- RUN useradd -m -u 1000 user
7
- USER user
8
- ENV PATH="/home/user/.local/bin:$PATH"
9
 
 
10
  WORKDIR /app
11
 
12
- RUN apt-get update && apt-get install -y ffmpeg && apt-get clean
 
 
 
 
13
 
14
- COPY --chown=user ./requirements.txt requirements.txt
15
- RUN pip install --no-cache-dir --upgrade -r requirements.txt
16
 
17
- COPY --chown=user . /app
18
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ FROM ubuntu:20.04
 
2
 
3
+ # Install Python and system dependencies
4
+ RUN apt-get update && apt-get install -y python3 python3-pip ffmpeg && apt-get clean
 
 
 
5
 
6
+ # Set working directory
7
  WORKDIR /app
8
 
9
+ # Copy application files
10
+ COPY . /app
11
+
12
+ # Install Python dependencies
13
+ RUN pip install --no-cache-dir -r requirements.txt
14
 
15
+ # Expose the application port
16
+ EXPOSE 8000
17
 
18
+ # Command to run the application
19
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]