Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +10 -4
Dockerfile
CHANGED
@@ -1,16 +1,22 @@
|
|
1 |
FROM python:3.11-slim
|
2 |
|
3 |
# Set the working directory to the root
|
4 |
-
WORKDIR /
|
5 |
|
6 |
# Copy application files to the root
|
7 |
-
COPY . /
|
8 |
|
9 |
# Install dependencies
|
10 |
-
RUN pip install --no-cache-dir
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
# Expose the port for the app
|
13 |
EXPOSE 7860
|
14 |
|
15 |
# Command to run app.py directly
|
16 |
-
CMD ["python", "app.py"]
|
|
|
1 |
FROM python:3.11-slim
|
2 |
|
3 |
# Set the working directory to the root
|
4 |
+
WORKDIR /
|
5 |
|
6 |
# Copy application files to the root
|
7 |
+
COPY . /
|
8 |
|
9 |
# Install dependencies
|
10 |
+
RUN pip install --no-cache-dir flask transformers
|
11 |
+
|
12 |
+
# Set Hugging Face cache directory
|
13 |
+
ENV HF_HOME="/tmp/huggingface"
|
14 |
+
|
15 |
+
# Create the cache directory and set permissions
|
16 |
+
RUN mkdir -p /tmp/huggingface && chmod -R 777 /tmp/huggingface
|
17 |
|
18 |
# Expose the port for the app
|
19 |
EXPOSE 7860
|
20 |
|
21 |
# Command to run app.py directly
|
22 |
+
CMD ["python", "app.py"]
|