Spaces:
Sleeping
Sleeping
Mimi
commited on
Commit
·
3b7c309
1
Parent(s):
46859a6
permission denied fix
Browse files- Dockerfile +5 -4
Dockerfile
CHANGED
@@ -16,11 +16,12 @@ COPY --chown=user . .
|
|
16 |
|
17 |
USER user
|
18 |
|
19 |
-
RUN pip install --no-cache-dir --
|
|
|
|
|
20 |
|
21 |
-
#
|
22 |
-
CMD huggingface-cli login --token $HF_TOKEN --add-to-git-credential && \
|
23 |
-
chown -R user:user $HOME/.cache/huggingface/stored_tokens && \
|
24 |
streamlit run app.py \
|
25 |
--server.headless true \
|
26 |
--server.enableCORS false \
|
|
|
16 |
|
17 |
USER user
|
18 |
|
19 |
+
RUN pip install --no-cache-dir --user -r requirements.txt
|
20 |
+
# Ensure Hugging Face token storage has the correct permissions
|
21 |
+
RUN mkdir -p $HOME/.cache/huggingface && chmod -R 700 $HOME/.cache/huggingface
|
22 |
|
23 |
+
# Run the application
|
24 |
+
CMD huggingface-cli login --token "$HF_TOKEN" --add-to-git-credential && \
|
|
|
25 |
streamlit run app.py \
|
26 |
--server.headless true \
|
27 |
--server.enableCORS false \
|