LazyBoss commited on
Commit
691c292
·
verified ·
1 Parent(s): 67a2e56

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -14
Dockerfile CHANGED
@@ -1,23 +1,20 @@
1
- FROM python:3.8-slim
 
2
 
 
3
  WORKDIR /app
4
 
5
- # Install system dependencies
6
- RUN apt-get update && apt-get install -y \
7
- libglib2.0-0 \
8
- libsm6 \
9
- libxrender-dev \
10
- libxext6 \
11
- ffmpeg
12
 
13
- # Install Python dependencies
14
- COPY requirements.txt requirements.txt
15
  RUN pip install --no-cache-dir -r requirements.txt
16
 
17
- # Copy application files
18
  COPY . .
19
 
20
- # Expose port
21
- EXPOSE 7860
22
 
23
- CMD ["python", "app.py"]
 
 
1
+ # Use an official Python runtime as the base image
2
+ FROM python:3.11-slim
3
 
4
+ # Set the working directory in the container
5
  WORKDIR /app
6
 
7
+ # Copy the requirements file into the container
8
+ COPY requirements.txt .
 
 
 
 
 
9
 
10
+ # Install dependencies
 
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
+ # Copy the current directory contents into the container at /app
14
  COPY . .
15
 
16
+ # Expose port 8000 to the outside world
17
+ EXPOSE 8000
18
 
19
+ # Command to run the FastAPI application
20
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]