Watchhrr commited on
Commit
966293c
·
verified ·
1 Parent(s): 285534e

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +20 -0
Dockerfile ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use BuildKit to access secrets securely
2
+ FROM python:3.9
3
+
4
+ WORKDIR /code
5
+ COPY . .
6
+
7
+ # Install wget
8
+ RUN apt-get update && apt-get install -y wget
9
+
10
+ # Download database using the secret we created in Settings
11
+ # Isse Hugging Face token detect nahi karega code mein
12
+ RUN --mount=type=secret,id=MY_HF_TOKEN,mode=0444,required=true \
13
+ wget --header="Authorization: Bearer $(cat /run/secrets/MY_HF_TOKEN)" \
14
+ https://huggingface.co/datasets/Watchhrr/Insta17m/resolve/main/insta_hitech.duckdb \
15
+ -O insta_hitech.duckdb
16
+
17
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
18
+
19
+ EXPOSE 7860
20
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]