Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +12 -6
Dockerfile
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
# Use a base image with Python
|
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 |
-
#
|
18 |
-
|
19 |
-
|
20 |
|
21 |
-
# Set the
|
22 |
-
|
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"]
|