testing_space / Dockerfile
everydaytok's picture
Update Dockerfile
79df83a verified
raw
history blame contribute delete
547 Bytes
# Use the official lightweight Python image
FROM python:3.12
# Set the working directory
WORKDIR /app
# Copy dependencies and install them
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application code
COPY . .
# Create a directory for static files (frontend) if it doesn't exist
RUN mkdir -p static
# Expose the port Hugging Face expects
EXPOSE 7860
# Run data generation first, then start the server
CMD ["python", "app.py"]
# CMD ["bash", "-lc", "python data_gen.py && python app.py"]