CooLLaMACEO commited on
Commit
a30aa25
·
verified ·
1 Parent(s): 33f9194

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +35 -0
Dockerfile ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # Install git and git-lfs to handle large files
6
+ RUN apt-get update && apt-get install -y \
7
+ git \
8
+ git-lfs \
9
+ && git lfs install \
10
+ && rm -rf /var/lib/apt/lists/*
11
+
12
+ # Install requirements
13
+ COPY requirements.txt .
14
+ RUN pip install --no-cache-dir -r requirements.txt
15
+
16
+ # ARG allows passing the token during build time
17
+ ARG HF_TOKEN
18
+ ENV HF_TOKEN=${HF_TOKEN}
19
+
20
+ # Use the CLI to download only the model files into the /app/model folder
21
+ # This skips the git history, README, and attributes automatically
22
+ RUN huggingface-cli download CooLLaMACEO/Overflow-100B \
23
+ --local-dir /app/model \
24
+ --local-dir-use-symlinks False \
25
+ --exclude "README.md" ".gitattributes" \
26
+ --token ${HF_TOKEN}
27
+
28
+ # Copy your local app files
29
+ COPY app.py modeling_overflow.py configuration_overflow.py ./
30
+
31
+ # Force CPU mode
32
+ ENV CUDA_VISIBLE_DEVICES=""
33
+ EXPOSE 7860
34
+
35
+ CMD ["python3", "app.py"]