Jaimodiji commited on
Commit
39138b5
·
1 Parent(s): fc526fe

Upload Dockerfile with huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +1 -10
Dockerfile CHANGED
@@ -1,6 +1,5 @@
1
  FROM python:3.11-slim
2
 
3
- # Install system dependencies for OpenCV and HF
4
  RUN apt-get update && apt-get install -y \
5
  git \
6
  git-lfs \
@@ -9,29 +8,21 @@ RUN apt-get update && apt-get install -y \
9
  libglib2.0-0 \
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
- # Install production dependencies
13
- RUN pip install --no-cache-dir huggingface_hub[cli] gunicorn eventlet
14
-
15
  WORKDIR /app
16
 
17
- # Copy requirements and install
18
  COPY requirements.txt .
 
19
  RUN pip install --no-cache-dir -r requirements.txt
20
 
21
- # Copy the rest of the application
22
  COPY . .
23
-
24
- # Ensure scripts are executable
25
  RUN chmod +x entrypoint.sh
26
 
27
- # HF Spaces default user is 1000
28
  RUN useradd -m -u 1000 user
29
  RUN chown -R user:user /app
30
  USER user
31
  ENV HOME=/home/user
32
  ENV PATH=/home/user/.local/bin:$PATH
33
 
34
- # Environment variables
35
  ENV PORT=7680
36
  ENV PYTHONUNBUFFERED=1
37
 
 
1
  FROM python:3.11-slim
2
 
 
3
  RUN apt-get update && apt-get install -y \
4
  git \
5
  git-lfs \
 
8
  libglib2.0-0 \
9
  && rm -rf /var/lib/apt/lists/*
10
 
 
 
 
11
  WORKDIR /app
12
 
 
13
  COPY requirements.txt .
14
+ RUN pip install --no-cache-dir gunicorn eventlet huggingface_hub[cli]
15
  RUN pip install --no-cache-dir -r requirements.txt
16
 
 
17
  COPY . .
 
 
18
  RUN chmod +x entrypoint.sh
19
 
 
20
  RUN useradd -m -u 1000 user
21
  RUN chown -R user:user /app
22
  USER user
23
  ENV HOME=/home/user
24
  ENV PATH=/home/user/.local/bin:$PATH
25
 
 
26
  ENV PORT=7680
27
  ENV PYTHONUNBUFFERED=1
28