understanding commited on
Commit
968eeaa
·
verified ·
1 Parent(s): 8b951f6

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -1
Dockerfile CHANGED
@@ -1,5 +1,7 @@
 
1
  FROM python:3.11-slim
2
 
 
3
  RUN apt-get update && \
4
  apt-get install -y --no-install-recommends \
5
  build-essential \
@@ -8,17 +10,22 @@ RUN apt-get update && \
8
  wget \
9
  && rm -rf /var/lib/apt/lists/*
10
 
 
11
  WORKDIR /app
12
 
 
13
  COPY . /app/
14
 
 
15
  RUN mkdir -p ./downloads ./logs ./data && \
16
  chmod -R 777 ./downloads ./logs ./data
17
 
 
18
  RUN pip install --upgrade pip
19
  RUN pip install -r requirements.txt
20
 
21
- # Expose web port for FastAPI
22
  EXPOSE 7860
23
 
 
24
  CMD ["python", "main.py"]
 
1
+ # Use slim image for small size
2
  FROM python:3.11-slim
3
 
4
+ # Install system dependencies
5
  RUN apt-get update && \
6
  apt-get install -y --no-install-recommends \
7
  build-essential \
 
10
  wget \
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
+ # Set working directory
14
  WORKDIR /app
15
 
16
+ # Copy app files
17
  COPY . /app/
18
 
19
+ # Create necessary directories and set permissions
20
  RUN mkdir -p ./downloads ./logs ./data && \
21
  chmod -R 777 ./downloads ./logs ./data
22
 
23
+ # Install Python deps
24
  RUN pip install --upgrade pip
25
  RUN pip install -r requirements.txt
26
 
27
+ # Expose FastAPI port
28
  EXPOSE 7860
29
 
30
+ # Start FastAPI app (main.py will start both bot and web server)
31
  CMD ["python", "main.py"]