sahanes commited on
Commit
4672366
·
verified ·
1 Parent(s): 7b0122f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -6
Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- # Use a base image with Python and necessary libraries
2
  FROM python:3.9-slim
3
 
4
  # Install system dependencies
@@ -14,15 +14,21 @@ RUN pip install cython numpy
14
  # Install Hugging Face transformers and datasets
15
  RUN pip install transformers datasets
16
 
17
- # Copy and install the requirements file
18
- COPY requirements.txt /app/requirements.txt
19
- RUN pip install -r /app/requirements.txt
20
 
21
- # Set the working directory
22
- WORKDIR /app
23
 
24
  # Copy the application code
25
  COPY . /app
26
 
 
 
 
 
 
 
27
  # Command to run your application
28
  CMD ["python", "app.py"]
 
1
+ # Use a base image with Python
2
  FROM python:3.9-slim
3
 
4
  # Install system dependencies
 
14
  # Install Hugging Face transformers and datasets
15
  RUN pip install transformers datasets
16
 
17
+ # Create necessary directories with appropriate permissions
18
+ RUN mkdir -p /app/.files && \
19
+ chmod -R 777 /app/.files
20
 
21
+ # Set environment variable to specify the files directory
22
+ ENV FILES_DIRECTORY=/app/.files
23
 
24
  # Copy the application code
25
  COPY . /app
26
 
27
+ # Set the working directory
28
+ WORKDIR /app
29
+
30
+ # Install application dependencies
31
+ RUN pip install -r requirements.txt
32
+
33
  # Command to run your application
34
  CMD ["python", "app.py"]