SushantGautam commited on
Commit
2a2017e
·
1 Parent(s): 8579b47

Refactor Dockerfile to use huggingface-cli for downloading SQLite database and remove wget installation

Browse files
Files changed (2) hide show
  1. Dockerfile +1 -4
  2. requirements.txt +2 -1
Dockerfile CHANGED
@@ -8,8 +8,6 @@ RUN apt-get update && apt-get install -y \
8
  pkg-config \
9
  && rm -rf /var/lib/apt/lists/*
10
 
11
- RUN apt-get update && apt-get install -y wget
12
-
13
  # Set environment vars
14
  ENV PYTHONDONTWRITEBYTECODE 1
15
  ENV PYTHONUNBUFFERED 1
@@ -24,8 +22,7 @@ RUN pip install --upgrade pip && pip install -r requirements.txt
24
  # Copy project files
25
  COPY . .
26
 
27
- RUN echo "Using cache buster: $CACHE_BUSTER" && \
28
- wget "https://huggingface.co/datasets/SushantGautam/BridgeMentor/resolve/main/db.sqlite3?download=true" -O db.sqlite3
29
 
30
  # Run server
31
  CMD ["gunicorn", "BridgeMentor.wsgi:application", "--bind", "0.0.0.0:7860"]
 
8
  pkg-config \
9
  && rm -rf /var/lib/apt/lists/*
10
 
 
 
11
  # Set environment vars
12
  ENV PYTHONDONTWRITEBYTECODE 1
13
  ENV PYTHONUNBUFFERED 1
 
22
  # Copy project files
23
  COPY . .
24
 
25
+ RUN huggingface-cli download SushantGautam/BridgeMentor db.sqlite3 --repo-type dataset --local-dir . --local-dir-use-symlinks False
 
26
 
27
  # Run server
28
  CMD ["gunicorn", "BridgeMentor.wsgi:application", "--bind", "0.0.0.0:7860"]
requirements.txt CHANGED
@@ -3,4 +3,5 @@ graphene-django
3
  django-filter
4
  mysqlclient
5
  gunicorn
6
- social-auth-app-django
 
 
3
  django-filter
4
  mysqlclient
5
  gunicorn
6
+ social-auth-app-django
7
+ huggingface_hub