Do0rMaMu commited on
Commit
afc4fb1
·
verified ·
1 Parent(s): ea47add

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -3
Dockerfile CHANGED
@@ -3,16 +3,16 @@ FROM python:3.9-slim
3
 
4
  # Set the working directory in the container
5
  WORKDIR /code
6
- RUN mkdir -p /code/.cache
7
 
8
- ENV TRANSFORMERS_CACHE=/code/.cache
9
  # Copy the requirements.txt file into the container at /code
10
  COPY requirements.txt /code/requirements.txt
11
 
12
-
13
  # Install any dependencies specified in requirements.txt
14
  RUN pip install --no-cache-dir -r requirements.txt
15
 
 
 
 
16
  # Copy the current directory contents into the container at /code
17
  COPY . .
18
 
 
3
 
4
  # Set the working directory in the container
5
  WORKDIR /code
 
6
 
 
7
  # Copy the requirements.txt file into the container at /code
8
  COPY requirements.txt /code/requirements.txt
9
 
 
10
  # Install any dependencies specified in requirements.txt
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
+ # Download the Florence-2-base-ft model and processor
14
+ RUN python -c "from transformers import AutoModelForCausalLM, AutoProcessor; model = AutoModelForCausalLM.from_pretrained('microsoft/Florence-2-base-ft', trust_remote_code=True); processor = AutoProcessor.from_pretrained('microsoft/Florence-2-base-ft', trust_remote_code=True); model.save_pretrained('/code/florence_model'); processor.save_pretrained('/code/florence_processor')"
15
+
16
  # Copy the current directory contents into the container at /code
17
  COPY . .
18