LazyBoss commited on
Commit
9bccc23
·
verified ·
1 Parent(s): 4497ccf

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -17
Dockerfile CHANGED
@@ -1,26 +1,20 @@
1
- FROM python:3.8-slim
 
2
 
 
3
  WORKDIR /app
4
 
5
- # Create a directory for data and set permissions
6
- RUN mkdir -p /app/data && chmod -R 777 /app/data
7
 
8
- # Install system dependencies
9
- RUN apt-get update && apt-get install -y \
10
- libglib2.0-0 \
11
- libsm6 \
12
- libxrender-dev \
13
- libxext6 \
14
- ffmpeg
15
-
16
- # Install Python dependencies
17
- COPY requirements.txt requirements.txt
18
  RUN pip install --no-cache-dir -r requirements.txt
19
 
20
- # Copy application files
21
  COPY . .
22
 
23
- # Expose port
24
- EXPOSE 7860
25
 
26
- CMD ["python", "app.py"]
 
 
1
+ # Use the official Python image
2
+ FROM python:3.11-slim
3
 
4
+ # Set the working directory in the container
5
  WORKDIR /app
6
 
7
+ # Copy the dependencies file to the working directory
8
+ COPY requirements.txt .
9
 
10
+ # Install the dependencies
 
 
 
 
 
 
 
 
 
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
+ # Copy the content of the local src directory to the working directory
14
  COPY . .
15
 
16
+ # Expose port 8000
17
+ EXPOSE 8000
18
 
19
+ # Command to run the FastAPI application
20
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]