Prat0 commited on
Commit
ec30fb1
·
verified ·
1 Parent(s): e4926ee

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -2
Dockerfile CHANGED
@@ -8,7 +8,7 @@ RUN apt-get update && apt-get install -y \
8
  && rm -rf /var/lib/apt/lists/*
9
 
10
  # Set the working directory in the container
11
- WORKDIR /
12
 
13
  # Copy the requirements file into the container
14
  COPY requirements.txt .
@@ -16,6 +16,12 @@ COPY requirements.txt .
16
  # Install the dependencies
17
  RUN pip install --no-cache-dir -r requirements.txt
18
 
 
 
 
 
 
 
19
  # Copy the application code into the container
20
  COPY . .
21
 
@@ -23,4 +29,4 @@ COPY . .
23
  EXPOSE 7860
24
 
25
  # Command to run the FastAPI application
26
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
8
  && rm -rf /var/lib/apt/lists/*
9
 
10
  # Set the working directory in the container
11
+ WORKDIR /app
12
 
13
  # Copy the requirements file into the container
14
  COPY requirements.txt .
 
16
  # Install the dependencies
17
  RUN pip install --no-cache-dir -r requirements.txt
18
 
19
+ # Create a directory for NLTK data to avoid permission issues
20
+ RUN mkdir -p /app/nltk_data
21
+
22
+ # Set environment variable for NLTK data
23
+ ENV NLTK_DATA=/app/nltk_data
24
+
25
  # Copy the application code into the container
26
  COPY . .
27
 
 
29
  EXPOSE 7860
30
 
31
  # Command to run the FastAPI application
32
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]