aa1223 commited on
Commit
b71e113
1 Parent(s): 1420f74

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -2
Dockerfile CHANGED
@@ -4,16 +4,23 @@ FROM python:3.12-slim
4
  # Set the working directory in the container.
5
  WORKDIR /llava-fastapi
6
 
7
- # Copy the current directory contents into the container at /app.
8
  COPY . /llava-fastapi
9
 
 
 
 
 
 
 
 
10
  # Install any needed packages specified in requirements.txt.
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
  # Make port 8000 available to the world outside this container.
14
  EXPOSE 8000
15
 
16
- # Define environment variable
17
  ENV HOST=0.0.0.0
18
 
19
  # Run uvicorn server on container startup.
 
4
  # Set the working directory in the container.
5
  WORKDIR /llava-fastapi
6
 
7
+ # Copy the current directory contents into the container at /llava-fastapi.
8
  COPY . /llava-fastapi
9
 
10
+ # Create the cache directory and set permissions.
11
+ RUN mkdir -p /workspace/cache && \
12
+ chmod -R 777 /workspace/cache
13
+
14
+ # Set the environment variable for the transformers cache directory.
15
+ ENV TRANSFORMERS_CACHE=/workspace/cache
16
+
17
  # Install any needed packages specified in requirements.txt.
18
  RUN pip install --no-cache-dir -r requirements.txt
19
 
20
  # Make port 8000 available to the world outside this container.
21
  EXPOSE 8000
22
 
23
+ # Define environment variable for the host.
24
  ENV HOST=0.0.0.0
25
 
26
  # Run uvicorn server on container startup.