NitinBot001 commited on
Commit
d3fbb15
·
verified ·
1 Parent(s): 3e949dd

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -17
Dockerfile CHANGED
@@ -1,36 +1,25 @@
1
- # Use an official Python runtime as a parent image
2
  FROM python:3.10-slim
3
 
4
- # Set the working directory in the container
5
  WORKDIR /app
6
 
7
- # Install system dependencies required for llama-cpp-python
8
  RUN apt-get update && apt-get install -y \
9
  build-essential \
10
  cmake \
11
  git \
 
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
- # Copy the requirements file into the container
15
  COPY requirements.txt .
16
 
17
- # Install Python dependencies
18
  RUN pip install --no-cache-dir -r requirements.txt
19
 
20
- # Install Node.js and nport
21
- RUN apt-get update && apt-get install -y curl && \
22
- curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
23
- apt-get install -y nodejs && \
24
- npm install -g nport
25
 
26
- # Copy the application code into the container
27
  COPY app.py .
 
28
 
29
- # Expose port 5000 for the Flask app
30
  EXPOSE 5000
31
 
32
- # Run as root user
33
- USER root
34
-
35
- # Command to run the application
36
- CMD ["python", "app.py"]
 
 
1
  FROM python:3.10-slim
2
 
 
3
  WORKDIR /app
4
 
 
5
  RUN apt-get update && apt-get install -y \
6
  build-essential \
7
  cmake \
8
  git \
9
+ curl \
10
  && rm -rf /var/lib/apt/lists/*
11
 
 
12
  COPY requirements.txt .
13
 
 
14
  RUN pip install --no-cache-dir -r requirements.txt
15
 
16
+ RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
17
+ && apt-get install -y nodejs \
18
+ && npm install -g nport
 
 
19
 
 
20
  COPY app.py .
21
+ COPY wsgi.py .
22
 
 
23
  EXPOSE 5000
24
 
25
+ CMD ["gunicorn", "--bind", "0.0.0.0:5000", "--timeout", "600", "wsgi:app"]