choco-conoz commited on
Commit
96e55c3
·
1 Parent(s): 2b7227f

feat: set permission

Browse files
Files changed (2) hide show
  1. Dockerfile +6 -1
  2. requirements.txt +3 -2
Dockerfile CHANGED
@@ -12,7 +12,7 @@ RUN apt-get update && apt-get install -y \
12
  ENV PYTHONUNBUFFERED=1 \
13
  PORT=8000 \
14
  HF_HOME=/home/user/huggingface
15
-
16
  COPY src/ ./src/
17
  # RUN pip3 install poetry==2.1.3
18
  # RUN pip install -U "huggingface_hub"
@@ -25,6 +25,11 @@ RUN pip3 install -r requirements.txt
25
  # ENV VIRTUAL_ENV=/app/.venv
26
  # ENV PATH="$VIRTUAL_ENV/bin:$PATH"
27
 
 
 
 
 
 
28
  EXPOSE 8501
29
 
30
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
 
12
  ENV PYTHONUNBUFFERED=1 \
13
  PORT=8000 \
14
  HF_HOME=/home/user/huggingface
15
+
16
  COPY src/ ./src/
17
  # RUN pip3 install poetry==2.1.3
18
  # RUN pip install -U "huggingface_hub"
 
25
  # ENV VIRTUAL_ENV=/app/.venv
26
  # ENV PATH="$VIRTUAL_ENV/bin:$PATH"
27
 
28
+ RUN mkdir -p ./hf_home/
29
+ RUN chmod -R 777 ./hf_home/
30
+ RUN sh -c "export HF_HOME=/app/hf_home/"
31
+ CMD ["sh", "-c", "export HF_HOME=/app/hf_home/"]
32
+
33
  EXPOSE 8501
34
 
35
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
requirements.txt CHANGED
@@ -1,6 +1,7 @@
1
  # altair
2
  # pandas
3
  streamlit>=1.46.1
4
- # transformers
5
  torch==2.7.0
6
- sentence-transformers>=3.0.0
 
 
1
  # altair
2
  # pandas
3
  streamlit>=1.46.1
4
+ # transformers==4.53.0
5
  torch==2.7.0
6
+ sentence-transformers>=3.0.0
7
+ huggingface_hub>=0.33.1