Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +5 -9
Dockerfile
CHANGED
|
@@ -2,7 +2,7 @@ FROM python:3.9-slim
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
# Install system dependencies
|
| 6 |
RUN apt-get update && apt-get install -y \
|
| 7 |
git \
|
| 8 |
gcc \
|
|
@@ -10,10 +10,10 @@ RUN apt-get update && apt-get install -y \
|
|
| 10 |
make \
|
| 11 |
&& rm -rf /var/lib/apt/lists/*
|
| 12 |
|
| 13 |
-
# Create cache directory
|
| 14 |
RUN mkdir -p /.cache && chmod -R 777 /.cache
|
| 15 |
|
| 16 |
-
# Set environment variables
|
| 17 |
ENV TRANSFORMERS_CACHE=/.cache
|
| 18 |
ENV HF_HOME=/.cache
|
| 19 |
ENV HUGGINGFACE_HUB_CACHE=/.cache
|
|
@@ -22,12 +22,8 @@ ENV HUGGINGFACE_HUB_CACHE=/.cache
|
|
| 22 |
COPY requirements.txt .
|
| 23 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 24 |
|
| 25 |
-
#
|
| 26 |
-
|
| 27 |
-
# RUN python -c "from transformers import AutoTokenizer; AutoTokenizer.from_pretrained('codellama/CodeLlama-7b-hf')"
|
| 28 |
-
|
| 29 |
-
# Copy code
|
| 30 |
-
COPY . .
|
| 31 |
|
| 32 |
# Expose port
|
| 33 |
EXPOSE 7860
|
|
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
+
# Install system dependencies
|
| 6 |
RUN apt-get update && apt-get install -y \
|
| 7 |
git \
|
| 8 |
gcc \
|
|
|
|
| 10 |
make \
|
| 11 |
&& rm -rf /var/lib/apt/lists/*
|
| 12 |
|
| 13 |
+
# Create cache directory
|
| 14 |
RUN mkdir -p /.cache && chmod -R 777 /.cache
|
| 15 |
|
| 16 |
+
# Set environment variables
|
| 17 |
ENV TRANSFORMERS_CACHE=/.cache
|
| 18 |
ENV HF_HOME=/.cache
|
| 19 |
ENV HUGGINGFACE_HUB_CACHE=/.cache
|
|
|
|
| 22 |
COPY requirements.txt .
|
| 23 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 24 |
|
| 25 |
+
# Copy application code
|
| 26 |
+
COPY main.py .
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
# Expose port
|
| 29 |
EXPOSE 7860
|