tsrivallabh commited on
Commit
db7d24a
·
verified ·
1 Parent(s): 91ebeb2

Synced repo using 'sync_with_huggingface' Github Action

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -7
Dockerfile CHANGED
@@ -1,7 +1,5 @@
1
- # Use an official Python runtime as a parent image
2
  FROM python:3.11-slim
3
 
4
- # Set the working directory in the container
5
  WORKDIR /app
6
 
7
  ENV HF_HOME=/data/hf_cache
@@ -11,18 +9,16 @@ ENV HF_HUB_CACHE=/data/hf_cache/hub
11
 
12
  RUN mkdir -p /data/hf_cache/transformers /data/hf_cache/datasets /data/hf_cache/hub && chmod -R 777 /data/hf_cache
13
 
14
- # Copy requirements.txt and install dependencies
 
 
15
  COPY requirements.txt .
16
  RUN pip install --no-cache-dir -r requirements.txt
17
 
18
- # Copy the rest of your app's code
19
  COPY . .
20
 
21
- # Make entrypoint script executable
22
  RUN chmod +x /app/entrypoint.sh
23
 
24
- # Expose the port Streamlit runs on
25
  EXPOSE 8501
26
 
27
- # Use the entrypoint script to run all scripts in order, then launch Streamlit
28
  ENTRYPOINT ["/app/entrypoint.sh"]
 
 
1
  FROM python:3.11-slim
2
 
 
3
  WORKDIR /app
4
 
5
  ENV HF_HOME=/data/hf_cache
 
9
 
10
  RUN mkdir -p /data/hf_cache/transformers /data/hf_cache/datasets /data/hf_cache/hub && chmod -R 777 /data/hf_cache
11
 
12
+ # Ensure /app is writable
13
+ RUN chmod -R 777 /app
14
+
15
  COPY requirements.txt .
16
  RUN pip install --no-cache-dir -r requirements.txt
17
 
 
18
  COPY . .
19
 
 
20
  RUN chmod +x /app/entrypoint.sh
21
 
 
22
  EXPOSE 8501
23
 
 
24
  ENTRYPOINT ["/app/entrypoint.sh"]