NitinBot001 commited on
Commit
80e1c62
·
verified ·
1 Parent(s): 048224c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -11
Dockerfile CHANGED
@@ -1,25 +1,28 @@
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"]
 
 
 
1
  FROM python:3.10-slim
2
 
3
+ # Create persistent storage directory
4
+ RUN mkdir -p /data/model /data/repo && \
5
+ chmod -R a+rwx /data
6
 
7
+ # System dependencies
8
  RUN apt-get update && apt-get install -y \
9
  build-essential \
 
10
  git \
11
  curl \
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
+ # Install Node.js and nport
15
+ RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
16
+ apt-get install -y nodejs && \
17
+ npm install -g nport
18
 
19
+ # Python dependencies
20
+ COPY requirements.txt .
21
  RUN pip install --no-cache-dir -r requirements.txt
22
 
23
+ # Application code
 
 
 
24
  COPY app.py .
 
 
 
25
 
26
+ # Hugging Face Spaces configuration
27
+ EXPOSE 7860
28
+ CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--timeout", "600", "app:app"]