innofacisteven commited on
Commit
8ce441d
·
verified ·
1 Parent(s): 129e25e

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +17 -2
Dockerfile CHANGED
@@ -1,9 +1,24 @@
1
- FROM python:3.11-slim
2
 
3
  WORKDIR /app
 
 
 
 
 
 
 
4
  COPY requirements.txt .
5
  RUN pip install --no-cache-dir -r requirements.txt
6
 
 
7
  COPY . .
8
 
9
- CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
 
3
  WORKDIR /app
4
+
5
+ # Install system dependencies
6
+ RUN apt-get update && apt-get install -y \
7
+ build-essential \
8
+ && rm -rf /var/lib/apt/lists/*
9
+
10
+ # Copy requirements and install
11
  COPY requirements.txt .
12
  RUN pip install --no-cache-dir -r requirements.txt
13
 
14
+ # Copy application files
15
  COPY . .
16
 
17
+ # Create necessary directories and set permissions
18
+ RUN mkdir -p /app/data /app/storage /app/uploads && chmod -R 777 /app
19
+
20
+ # Expose the HF port
21
+ EXPOSE 7860
22
+
23
+ # Run the application
24
+ CMD ["python", "main.py"]