kouki321 commited on
Commit
d5516d0
·
verified ·
1 Parent(s): 5d96d6a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -15
Dockerfile CHANGED
@@ -1,24 +1,20 @@
 
1
  FROM python:3.10-slim
2
 
3
- # Set environment variables
4
- ENV PYTHONDONTWRITEBYTECODE=1
5
- ENV PYTHONUNBUFFERED=1
6
-
7
- # Install dependencies
8
- RUN apt-get update && apt-get install -y git
9
 
10
- # Install Python packages
11
- RUN pip install --upgrade pip
12
- RUN pip install fastapi uvicorn transformers torch
13
 
14
- # Set workdir
15
- WORKDIR /app
16
 
17
- # Copy your app code
18
  COPY . .
19
 
20
- # Expose port
21
  EXPOSE 7860
22
 
23
- # Run app
24
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ # Use an official Python runtime as a parent image
2
  FROM python:3.10-slim
3
 
4
+ # Set working directory in container
5
+ WORKDIR /app
 
 
 
 
6
 
7
+ # Copy requirements if you have them
8
+ COPY requirements.txt ./
 
9
 
10
+ # Install dependencies
11
+ RUN pip install --no-cache-dir -r requirements.txt
12
 
13
+ # Copy the rest of your code
14
  COPY . .
15
 
16
+ # Expose port (default for Gradio)
17
  EXPOSE 7860
18
 
19
+ # Command to run your app
20
+ CMD ["python", "app.py"]