ziuwuchuoi commited on
Commit
44b29b8
·
1 Parent(s): c9fe442

29 dockerfile co cong chuyen voi t

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -0
Dockerfile CHANGED
@@ -12,6 +12,8 @@
12
 
13
  # CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
14
 
 
 
15
  # Use the official Python 3.9 image from the Docker Hub
16
  FROM python:3.9
17
 
@@ -45,5 +47,12 @@ RUN chown -R appuser:appgroup /code
45
  # Switch to the non-root user
46
  USER appuser
47
 
 
 
 
 
 
 
48
  # Specify the command to run on container start
49
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
12
 
13
  # CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
14
 
15
+ # Use the official Python 3.9 image from the Docker Hub
16
+
17
  # Use the official Python 3.9 image from the Docker Hub
18
  FROM python:3.9
19
 
 
47
  # Switch to the non-root user
48
  USER appuser
49
 
50
+ # Set a new cache directory accessible to the user
51
+ RUN mkdir -p /home/appuser/my_custom_cache
52
+
53
+ # Set permissions for the Hugging Face cache directory
54
+ RUN mkdir -p /home/appuser/.cache/huggingface/hub && chown -R appuser:appgroup /home/appuser/.cache/huggingface
55
+
56
  # Specify the command to run on container start
57
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
58
+