prd101-wd commited on
Commit
a12acd4
·
verified ·
1 Parent(s): de4e2ff

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -31
Dockerfile CHANGED
@@ -1,34 +1,8 @@
1
- #FROM python:3.9-slim
2
- FROM python:3.10-slim
3
-
4
- # Set environment variables to avoid caching issues with Hugging Face
5
- ENV HF_HOME=/tmp/huggingface \
6
- TRANSFORMERS_CACHE=/tmp/huggingface/transformers \
7
- HF_DATASETS_CACHE=/tmp/huggingface/datasets \
8
- HUGGINGFACE_HUB_CACHE=/tmp/huggingface/hub \
9
- XDG_CACHE_HOME=/tmp/huggingface
10
-
11
- WORKDIR /app
12
-
13
- # RUN apt-get update && apt-get install -y \
14
- # build-essential \
15
- # curl \
16
- # software-properties-common \
17
- # git \
18
- # && rm -rf /var/lib/apt/lists/*
19
-
20
- COPY requirements.txt ./
21
- COPY src/ ./src/
22
-
23
- RUN pip install --no-cache-dir -r requirements.txt && \
24
- python -c "from transformers import AutoTokenizer, AutoModel; \
25
- AutoTokenizer.from_pretrained('prd101-wd/phi1_5-bankingqa-merged'); \
26
- AutoModel.from_pretrained('prd101-wd/phi1_5-bankingqa-merged')"
27
 
 
28
  EXPOSE 7860
29
 
30
- ENV PYTHONUNBUFFERED=1
31
-
32
- # HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
33
-
34
- CMD ["streamlit", "run", "./src/model_consumer.py", "--server.port=7860", "--server.address=0.0.0.0"]
 
1
+ #pull the image from dockerhub
2
+ FROM parthardas/banking-finetuned-phi1-5:latest
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
 
4
+ #expose the port that Hugging Face Spaces allows by default
5
  EXPOSE 7860
6
 
7
+ # define command that will override the docker image's Dockerfile CMD command
8
+ CMD ["streamlit", "run", "pipeline_consumer.py", "--server.port=7860", "--server.address=0.0.0.0"]