SharathReddy commited on
Commit
8e9e509
·
verified ·
1 Parent(s): 6f67ae7

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -6
Dockerfile CHANGED
@@ -1,14 +1,12 @@
1
  # Use an official Python runtime as a parent image
2
  FROM python:3.10-slim
3
 
4
- # --- ADD THIS LINE ---
5
- # Install git, which is a system dependency for the GitPython library
6
- RUN apt-get update && apt-get install -y git
7
- # --------------------
8
-
9
  # Set the working directory in the container
10
  WORKDIR /code
11
 
 
 
 
12
  # Copy the requirements file into the container
13
  COPY ./requirements.txt /code/requirements.txt
14
 
@@ -16,9 +14,10 @@ COPY ./requirements.txt /code/requirements.txt
16
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
17
 
18
  # Copy the rest of the application code into the container
 
19
  COPY ./app.py /code/app.py
20
 
21
- # Make port 7860 available
22
  EXPOSE 7860
23
 
24
  # Run app.py when the container launches
 
1
  # Use an official Python runtime as a parent image
2
  FROM python:3.10-slim
3
 
 
 
 
 
 
4
  # Set the working directory in the container
5
  WORKDIR /code
6
 
7
+ # NEW: Set a writeable cache directory for Hugging Face models
8
+ ENV HF_HOME /code/.cache
9
+
10
  # Copy the requirements file into the container
11
  COPY ./requirements.txt /code/requirements.txt
12
 
 
14
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
15
 
16
  # Copy the rest of the application code into the container
17
+ # We no longer need to copy .env since we use secrets
18
  COPY ./app.py /code/app.py
19
 
20
+ # Make port 7860 available to the world outside this container
21
  EXPOSE 7860
22
 
23
  # Run app.py when the container launches