jsodoge commited on
Commit
17f65fa
1 Parent(s): 5bcb9cc

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -2
Dockerfile CHANGED
@@ -1,13 +1,24 @@
1
  FROM python:3.12
2
 
 
3
  WORKDIR /code
4
 
5
- COPY ./requirements.txt /code/requirements.txt
 
 
 
 
 
6
 
 
 
7
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
8
 
 
9
  COPY . .
10
 
 
11
  EXPOSE 7860
12
 
13
- CMD ["shiny", "run", "app.py", "--host", "0.0.0.0", "--port", "7860"]
 
 
1
  FROM python:3.12
2
 
3
+ # Set the working directory
4
  WORKDIR /code
5
 
6
+ # Create a directory for Hugging Face cache
7
+ RUN mkdir -p /code/hf_home && \
8
+ chmod -R 777 /code/hf_home
9
+
10
+ # Set the HF_HOME environment variable
11
+ ENV HF_HOME=/code/hf_home
12
 
13
+ # Copy requirements and install
14
+ COPY ./requirements.txt /code/requirements.txt
15
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
16
 
17
+ # Copy the application code
18
  COPY . .
19
 
20
+ # Expose the port for the app
21
  EXPOSE 7860
22
 
23
+ # Command to run the Shiny app
24
+ CMD ["shiny", "run", "app.py", "--host", "0.0.0.0", "--port", "7860"]